Passing custom type query parameter

Take a look at the @QueryParam documentation, in regards to acceptable types to inject. (The same applies to all the other @XxxParam annotations also) Be a primitive type Have a constructor that accepts a single String argument Have a static method named valueOf or fromString that accepts a single String argument (see, for example, Integer.valueOf(String)) … Read more

Jersey 2.x Custom Injection Annotation With Attributes

Yeah Jersey made the creation of custom injections a bit more complicated in 2.x. There are a few main components to custom injection you need to know about with Jersey 2.x org.glassfish.hk2.api.Factory – Creates injectable objects/services org.glassfish.hk2.api.InjectionResolver – Used to create injection points for your own annotations. org.glassfish.jersey.server.spi.internal.ValueFactoryProvider – To provide parameter value injections. You … Read more