Well, the answer by @Sync is fundamentally wrong and not the question being asked.
- First of all, I use
@RequestParamin a lot of scenarios expecting either GET or POST HTTP messages and I’d like to say, that it works perfectly fine; - POST Message’s payload data (body) is actually the text data, which can perfectly legally be
paramname = paramvaluekey-value mapping(s) alike (see POST Message Body types here); docs.spring.io, an official source for Spring Documentation, clearly states, that:
In Spring MVC, “request parameters” map to query parameters, form
data, and parts in multipart requests.
So, the answer is YES, you can use @RequestParam annotation with @Controller class’s method’s parameter, as long as that method is a handler method (is request-mapped by @RequestMapping) and you don’t expect Object, this is perfectly legal and there’s nothing wrong with it.