users@jersey.java.net

[Jersey] Injection of more beans into one method in Jersey

From: gRizzlyGR <verci_at_live.it>
Date: Sat, 5 Sep 2015 06:51:31 -0700 (MST)

Hi to all. I have a question about injection of multiple beans in a resource
method; in the example 3.16 in Jersey chapter 3
<https://jersey.java.net/documentation/latest/jaxrs-resources.html#d0e2435>
shows that it's possible to inject more beans in a resource method:
    @POST
    public void post(@BeanParam MyBeanParam beanParam, @BeanParam
AnotherBean anotherBean /*other params*/) {
        ...
    }
But it doesn't show any URI pattern for `_at_Path` annotation to access the
method.In particular I need to implement a `GET` service for multiple beans
and access their query parameters, like so:
    @GET
    public Response post(@BeanParam MyBeanParam beanParam, @BeanParam
AnotherBean anotherBean /*other params*/) {
       // process query params and return something
    }

The URI should look like this, I think:
    http://[host]/mybeanparam?param1=v1&ampparam2=v2/anotherbean?param1=v3
Any suggestions?



--
View this message in context: http://jersey.576304.n2.nabble.com/Injection-of-more-beans-into-one-method-in-Jersey-tp7583420.html
Sent from the Jersey mailing list archive at Nabble.com.