0

I am migrating a project from Jersey 1.8 to 2.23.2.I have found following replacements till now :

In RestService :

1)com.sun.jersey.core.header.ContentDisposition to org.glassfish.jersey.media.multipart.ContentDisposition
2)com.sun.jersey.multipart.FormDataBodyPart     to org.glassfish.jersey.media.multipart.FormDataBodyPart
3)com.sun.jersey.multipart.FormDataMultiPart    to org.glassfish.jersey.media.multipart.FormDataMultiPart

In Web.xml :

1)com.sun.jersey.spi.spring.container.servlet.SpringServlet to org.glassfish.jersey.servlet.ServletContainer
2)com.sun.jersey.config.property.packages                   to jersey.config.server.provider.packages
3)com.sun.jersey.api.json.POJOMappingFeature                to org.glassfish.jersey.jackson.JacksonFeature

However I am not able to find how can I achieve dependency injection with jersey2.Earlier we were using com.sun.jersey.api.core.InjectParam like below :

public class AuthFilter implements Filter {

   /*@InjectParam
    private SomeService someService;*/
}

Can anyone please suggest ,how this can be done in Jersey2 in simplest way.

Thanks in advance.

BevynQ
  • 8,089
  • 4
  • 25
  • 37
javaguy
  • 927
  • 2
  • 16
  • 37
  • is this http://stackoverflow.com/questions/30397933/jersey-2-x-custom-injection-annotation-with-attributes what you are after? – BevynQ Aug 30 '16 at 07:20
  • 1
    Thanks for your response.This looks like too much for making dependency injection to work.I did not get it completely. Don't we simply have some replacement for com.sun.jersey.api.core.InjectParam. – javaguy Sep 01 '16 at 05:19

0 Answers0