1

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?

2

1 Answer 1

2

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) 
Sign up to request clarification or add additional context in comments.

Comments

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.