@FormParam
In JAX-RS, @FormParam
binds the value(s) of a form parameter contained within a request entity body to a resource method parameter.
There's no direct equivalent to @FormParam
in Spring MVC. The closest you will find is @RequestParam
:
@RequestParam("foo") String foo
And you also can get the parameter from the request:
String foo = request.getParameter("foo");
@BeanParam
In JAX-RS, @BeanParam
can be used to inject custom JAX-RS parameter aggregator value object into a resource class field, property or resource method parameter.
I'm not aware of any annotation that gives you a similar feature but according to this answer, you can create a class with field names that match your request parameters and add it as a method argument in your request handler method.
@Context
In JAX-RS, @Context
is used to inject JAX-RS contextual information into a class field, bean property or method parameter. So you won't find a direct equivalent to @Context
in Spring MVC either.
However Spring MVC has a predefined set of types that can automagically injected in method arguments.
And you also can use @Autowired
to inject some request/response contextual information in your class fields:
@Autowired
HttpServletRequest request;