jersey2.9集成spring4之后为什么注入不了数据~~~~~~~~~~

小菜鸟的梦 2017-11-18
<?xml version="1.0" encoding="UTF-8"?>
<web-app xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://java.sun.com/xml/ns/javaee" xsi:schemaLocation="http://java.sun.com/xml/ns/javaee http://java.sun.com/xml/ns/javaee/web-app_3_0.xsd" version="3.0" id="WebApp_1470042873706">

    <display-name>Archetype Created Web Application</display-name>
    <listener>
        <listener-class>org.springframework.web.context.ContextLoaderListener</listener-class>
    </listener>
    <servlet>
        <servlet-name>jersey-serlvet</servlet-name>
        <!-- 与Jersey1有区别 -->
        <servlet-class>org.glassfish.jersey.servlet.ServletContainer</servlet-class>
        <!-- <servlet-class>org.glassfish.jersey.servlet.</servlet-class> -->
        <!-- 配置自己的资源加载类去加载资源 --><!-- 建议用此方法,可控性强,不建议用默认的资源加载类 -->
        <init-param>
            <param-name>javax.ws.rs.Application</param-name>
            <param-value>demo.config.RESTServiceConfig</param-value>
        </init-param>
        <load-on-startup>1</load-on-startup>
    </servlet>

    <!-- Spring 配置文件路径 -->
    <context-param>
        <param-name>contextConfigLocation</param-name>
        <param-value>classpath:applicationContext.xml</param-value>
    </context-param>

    <servlet-mapping>
        <servlet-name>jersey-serlvet</servlet-name>
        <url-pattern>/rest/*</url-pattern>
    </servlet-mapping>
</web-app>


Global site tag (gtag.js) - Google Analytics