Jersey1.x + Spring 依赖注入出现 空指针异常
在使用rest风格和Spring的依赖注入做一个demo的时候。依赖注入 出现空指针异常 The RuntimeException could not be mapped to a response, re-throwing to the HTTP container java.lang.NullPointerException 就是没有 注入过去。。。 网上查了查。终于找都一种办法了。 http://www.cnblogs.com/qunyang/p/3328561.html 引用博主的原文: <context-param> <param-name>contextConfigLocation</param-name> <param-value>classpath:applicationContext.xml</param-value> </context-param> <listener> <listener-class>org.springframework.web.context.ContextLoaderListener</listener-class> </listener> <servlet> <servlet-name>jersey-serlvet</servlet-name> <servlet-class>com.sun.jersey.spi.spring