79257512

Date: 2024-12-06 09:46:47
Score: 2
Natty:
Report link

@RequestBody will expect JSON/XML as body, and if you are sending key/value pairs then you need to either use @ModelAttribute to bind directly to your FilterObj or use MultiValueMap to (sort of manually) parse pairs and use them in your controller.

Or, if you control the client of your REST service, then use json to send objects to your endpoint.

Reasons:
  • No code block (0.5):
  • User mentioned (1): @RequestBody
  • User mentioned (0): @ModelAttribute
  • Low reputation (0.5):
Posted by: embuc