spring-mvc

Spring MVC Missing URI template variable

与世无争的帅哥 提交于 2020-11-30 08:28:17
问题 I have a Controller class with a function that saves a record to the Database. I am passing several parameters to the Controller function however i think i may be writing the @RequestMapping incorrectly. Under is the code Controller @RequestMapping(value="createRoadBlock.htm", method = RequestMethod.POST) public @ResponseBody Integer createRoadBlock(@RequestParam String purpose, @RequestParam String userName, @RequestParam int status, @RequestParam double latAdd, @RequestParam double longAdd,

Spring MVC Missing URI template variable

冷暖自知 提交于 2020-11-30 08:25:52
问题 I have a Controller class with a function that saves a record to the Database. I am passing several parameters to the Controller function however i think i may be writing the @RequestMapping incorrectly. Under is the code Controller @RequestMapping(value="createRoadBlock.htm", method = RequestMethod.POST) public @ResponseBody Integer createRoadBlock(@RequestParam String purpose, @RequestParam String userName, @RequestParam int status, @RequestParam double latAdd, @RequestParam double longAdd,

Spring MVC Missing URI template variable

时光总嘲笑我的痴心妄想 提交于 2020-11-30 08:25:34
问题 I have a Controller class with a function that saves a record to the Database. I am passing several parameters to the Controller function however i think i may be writing the @RequestMapping incorrectly. Under is the code Controller @RequestMapping(value="createRoadBlock.htm", method = RequestMethod.POST) public @ResponseBody Integer createRoadBlock(@RequestParam String purpose, @RequestParam String userName, @RequestParam int status, @RequestParam double latAdd, @RequestParam double longAdd,

How to resolve request mapping “ambiguous” situation in spring controller?

六眼飞鱼酱① 提交于 2020-11-29 07:39:13
问题 I have written a spring controller in which I just wanted to use single URL for all methods. Even I am using different method signature int, string, object i am getting error. @RequestMapping(value="problemAPI/ticket", method = RequestMethod.GET ) public @ResponseBody String getTicketData(@RequestParam("customerId") int customerId) { return "customer Id: "+customerId+" has active Ticket:1010101"; } @RequestMapping(value="problemAPI/ticket", method = RequestMethod.GET ) public @ResponseBody

How to resolve request mapping “ambiguous” situation in spring controller?

我是研究僧i 提交于 2020-11-29 07:33:54
问题 I have written a spring controller in which I just wanted to use single URL for all methods. Even I am using different method signature int, string, object i am getting error. @RequestMapping(value="problemAPI/ticket", method = RequestMethod.GET ) public @ResponseBody String getTicketData(@RequestParam("customerId") int customerId) { return "customer Id: "+customerId+" has active Ticket:1010101"; } @RequestMapping(value="problemAPI/ticket", method = RequestMethod.GET ) public @ResponseBody