I am aware of @RequestMapping annotation which is used in Spring MVC based application.
I came across this piece of code:
@RequestMapping(method = POST, params = {"someParam"})
I understood the method
. However I don't know what params
means? Before this I never had seen anything which passed params to this annotation.
Can anyone help in understanding this?
Your example means that the parameter someParam
must be present in the request. This is used to narrow down the matching methods for the given request.
See the documentation: RequestMapping#params