获取com.sun.jersey.api.container.ContainerException:ResourceConfig实例在JBoss EAP 7上不包含任何根资源类

时间:2017-07-14 15:20:11

标签: jboss jersey

我的环境:JBOSS EAP 7,Jersey Rest Service 1.15

获取com.sun.jersey.api.container.ContainerException:ResourceConfig实例不包含任何根资源类。

的web.xml

  <display-name>Rest App 2</display-name>
    <context-param>
        <param-name>resteasy.scan</param-name>
        <param-value>false</param-value>
    </context-param>
    <context-param>
        <param-name>resteasy.scan.providers</param-name>
        <param-value>false</param-value>
    </context-param>
    <context-param>
        <param-name>resteasy.scan.resources</param-name>
        <param-value>false</param-value>
    </context-param>

    <context-param>
        <param-name>contextConfigLocation</param-name>
        <param-value>/WEB-INF/applicationContext.xml</param-value>
    </context-param>


    <servlet>
        <servlet-name>jersey-serlvet</servlet-name>
        <servlet-class>
            com.sun.jersey.spi.spring.container.servlet.SpringServlet
        </servlet-class>
        <init-param>
            <param-name>com.sun.jersey.config.property.packages</param-name>
            <param-value>com.test.app.service</param-value>
        </init-param>

        <init-param>
            <param-name>com.sun.jersey.api.json.POJOMappingFeature</param-name>
            <param-value>true</param-value>
        </init-param>


        <!-- <load-on-startup>1</load-on-startup> -->
    </servlet>

    <listener>
        <listener-class>
            org.springframework.web.context.ContextLoaderListener
        </listener-class>
    </listener>

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

我尝试了所有不同的选择,但没有成功。非常感谢任何帮助。

0 个答案:

没有答案