weblogic 12.2.1中未调用使用Spring的Rest Web服务

weblogic 12.2.1中未调用使用Spring的Rest Web服务,spring,rest,java-8,weblogic12c,Spring,Rest,Java 8,Weblogic12c,我们正在考虑将应用程序升级到Weblogic 12.2.1。服务器正常运行。但是我们不能调用任何web服务。它们是用Spring编写的。我们也在使用JDK 8 日志中出现的错误消息是: org.springframework.web.servlet.pageNot在名为“dispatcher”[noHandlerFound:1120{}的DispatcherServlet中未找到URI为[/test/components]的HTTP请求的映射 只有当我们使用安装程序安装应用程序时,问题才会出现当

我们正在考虑将应用程序升级到Weblogic 12.2.1。服务器正常运行。但是我们不能调用任何web服务。它们是用Spring编写的。我们也在使用JDK 8

日志中出现的错误消息是:

org.springframework.web.servlet.pageNot在名为“dispatcher”[noHandlerFound:1120{}的DispatcherServlet中未找到URI为[/test/components]的HTTP请求的映射

只有当我们使用安装程序安装应用程序时,问题才会出现当我们在开发环境中部署应用程序时,问题不会出现。我们能够成功调用服务

我们比较了安装程序中的类路径和开发中的类路径,它们是相同的

Dispatcher-servlet.xml

<beans
xmlns="http://www.springframework.org/schema/beans"
xmlns:context="http://www.springframework.org/schema/context"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xmlns:mvc="http://www.springframework.org/schema/mvc"
xmlns:tx="http://www.springframework.org/schema/tx"
xsi:schemaLocation="
    http://www.springframework.org/schema/beans     
    http://www.springframework.org/schema/beans/spring-beans-4.1.xsd
    http://www.springframework.org/schema/context 
    http://www.springframework.org/schema/context/spring-context-4.1.xsd
    http://www.springframework.org/schema/mvc
    http://www.springframework.org/schema/mvc/spring-mvc-4.1.xsd
    http://www.springframework.org/schema/tx
    http://www.springframework.org/schema/tx/spring-tx.xsd">

<context:component-scan base-package="test" />

<bean id="localeResolver"
      class="org.springframework.web.servlet.i18n.CookieLocaleResolver">
    <property name="defaultLocale" value="en" />
</bean>

<bean id="mvcConfigurationBeanPostProcessor"
      class="com.jda.webworks.publicapi.common.SpringMvcConfigBeanPostProcessor">
</bean>

<mvc:annotation-driven>
    <mvc:message-converters register-defaults="false">
        <bean class="org.springframework.http.converter.json.MappingJackson2HttpMessageConverter" />
        <bean class="org.springframework.http.converter.xml.Jaxb2RootElementHttpMessageConverter" />
        <bean class="org.springframework.http.converter.StringHttpMessageConverter" />
    </mvc:message-converters>
</mvc:annotation-driven>

<!-- enable the configuration of app server transactional behavior based on annotations -->
<tx:annotation-driven/>
<tx:jta-transaction-manager/>

<!-- Create instance of transaction template for programmatic transaction manipulation -->
<bean id="transactionTemplate" class="org.springframework.transaction.support.TransactionTemplate">
    <property name="transactionManager" ref="transactionManager"></property>
</bean>

我们还尝试添加
。但这没有帮助

web.xml

<?xml version="1.0" encoding="UTF-8"?>

http://java.sun.com/xml/ns/javaee/web-app_2_5.xsd“>


调度员
org.springframework.web.servlet.DispatcherServlet
1.
调度员
/*
上下文配置位置
/WEB-INF/dispatcher-servlet.xml
org.springframework.web.context.ContextLoaderListener
1.
WebWORKS RESTful服务
/*
邮递
收到
放
删去
网络用户
基本的
违约
网络用户


请给我们一些帮助解决问题的建议。

我们向Oracle提出了一个案例。与此同时,我们找到了解决上述问题的方法

如果rest类在WEB-INF/classes或WEB-INF/lib下可用,这似乎是可行的。以前,我们从ear/lib(通过application.xml设置为lib)的“更高”类加载器加载类,然后我们看到了问题。

当然,在WLS 12.1.3中,我们从来没有遇到过任何问题。包含REST类的.jar只在ear/lib中,而不在WAR的WEB-INF中。

您能添加WEB.xml吗?
<servlet>
    <servlet-name>dispatcher</servlet-name>
    <servlet-class>org.springframework.web.servlet.DispatcherServlet</servlet-class>
    <load-on-startup>1</load-on-startup>
</servlet>

<servlet-mapping>
    <servlet-name>dispatcher</servlet-name>
    <url-pattern>/*</url-pattern>
</servlet-mapping>

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

<!--
<context-param>
    <param-name>log4jConfigLocation</param-name>
    <param-value>/WEB-INF/config/log4j.xml</param-value>
</context-param>
-->

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

<!--
<listener>
    <listener-class>org.springframework.web.util.Log4jConfigListener</listener-class>
</listener>
-->

<session-config>
    <session-timeout>1</session-timeout>
</session-config>

<security-constraint>
    <web-resource-collection>
        <web-resource-name>WebWORKS RESTful Services</web-resource-name>
        <url-pattern>/*</url-pattern>
        <http-method>POST</http-method>
        <http-method>GET</http-method>
        <http-method>PUT</http-method>
        <http-method>DELETE</http-method>
    </web-resource-collection>
    <auth-constraint>
        <role-name>NetworksUsers</role-name>
    </auth-constraint>
</security-constraint>
<login-config>
    <auth-method>BASIC</auth-method>
    <realm-name>default</realm-name>
</login-config>
<security-role>
    <role-name>NetworksUsers</role-name>
</security-role>