When I am running test at that time @Autowired is working but when I run the web app and try to fetch data at that time its throwing null pointer exception.
I Have encountered this situation, you need to add some jar file
gradle project:
compile group: 'org.glassfish.jersey.ext', name: 'jersey-spring3', version: '2.22.2'
maven project:
org.glassfish.jersey.ext
jersey-spring3
2.22.2
another solution is web.xml file:
jersey-serlvet
com.sun.jersey.spi.spring.container.servlet.SpringServlet
com.sun.jersey.config.property.packages
cn.ice
1
jersey-serlvet
/*