dvelopp dvelopp - 1 year ago 180
reST (reStructuredText) Question

@ModelAttribute for Jersey similar to Spring

I wonder whether jersey has something like Spring MVC can offer to pass several query parameters inside a one. When we need to group several params in Spring MVC, we can use

and have these query params in URL listed as
... Then we just create a POJO that contains these fields. Does jersey have similar functionality? Using a json is unacceptable for my case cause I'm modifying an old API.


Answer Source

You could do that with @BeanParam starting with JAX-RS 2.0. See a sample here.

Recommended from our users: Dynamic Network Monitoring from WhatsUp Gold from IPSwitch. Free Download