我的控制器類是
@RequestMapping(method = RequestMethod.POST, value = "/auditregistry/collectionentry/cid/{cid}/collid/{collid}/colldt/{collectiondate}/amount/{amt}")
public ModelAndView saveManualCollection(@PathVariable("cid") Integer custId, @PathVariable("collid") Integer collRtId, @PathVariable("collectiondate") String dt, **@PathVariable("amt") String amount**) throws Exception
{
debug("amount recieving=="+amount);
和我傳遞到url的值
/auditregistry/collectionentry/CID/9991/COLLID/10/colldt/20120726 /數量/ $ 14.55
當我試圖打印量值其打印爲「$ 14」而不是「$ 14.55」我應該怎麼做才能打印實際值「$ 14.55」
任何幫助是非常心存感激
你嘗試調試,爲$ 14.55到來因爲它在Java代碼中。您可能應該在客戶端代碼 – titogeo