I have a spring controller with method
@RequestMapping(value="/list", method=RequestMethod.POST)
public ModelAndView getList(NSomeObject someObject)
but the query is something like localhost:8080/list?a=some_value&b=some_value
How to convert this to java object? Is there any counterpart of json and jackson?
You should do the following:
@RequestMapping(value="/list", method=RequestMethod.POST)
public ModelAndView getList(@RequestParam("a") String a_value, @RequestParam("b") String b_value, @RequestBody NSomeObject someObject)
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.