一些我有這個字符串:轉換字符串超過20位使用Java
0.023526112354180534
我怎樣才能改變這個字符串,數字,也許更多的數字?我試過Double.parseDouble而不工作
編輯
你是對的。
I'm使得從Javascript打電話,我的電話是:
url : "/myapp/data/selectedCampaign/thermal/"+data
數據= 0.023526112354180534
當我在春天進入這個方法
@RequestMapping(value = "/selectedCampaign/{type}/{evidenceValue}", method = RequestMethod.GET)
public @ResponseBody List<Double> getValues(@PathVariable("type") String type,
@PathVariable("evidenceValue") String evidenceValue)
evidenceValue是0和我解析0
我仍然不知道爲什麼。 EDIT 2
我前往reolve這個問題:
Spring MVC @PathVariable with dot (.) is getting truncated
你試過BigDecimal嗎? – rajadilipkolli
'Double.parseDouble'似乎完美工作。你遇到了什麼問題? – Mureinik