最近使用@RequestMapping 因為參數存在特殊字符導致的參數獲取不全 讓我焦頭爛額,常常胸悶難受,懇請大佬 解救我與水火之中問題如下
后端代碼
@RequestMapping(value = "/addReport/tiltle={tiltle}&date={date}&user_id={user_id}&company_id={company_id}&meassge={meassge}/static_st", method = RequestMethod.GET)
public String addReport(@PathVariable String tiltle, @PathVariable String date, @PathVariable String user_id, @PathVariable String company_id, @PathVariable String meassge) {
logger.error("========"+meassge);
}url:localhost:8080/addReport/tiltle=tiltle&date=2007-01-17&user_id=1&company_id=2&meassge={"data":"1234%56"}/static_st后臺打印的2018-01-19 13:04:12.063 ERROR 12312 --- [nio-8080-exec-8] c.wmfs.contoller.FunctionInfoController : ========{"data":"1234V"} ??? 到底是什么原因導致的不全的問題網上最多的就是 '.'的問題在 url 中添加 :.+ 可以解決還有的說和內置的tomcat的版本有關系,換了各種高低版本還是沒有解決
添加回答
舉報
0/150
提交
取消