问题描述
有一天,我一直在为这个错误而苦苦挣扎。
通过从Spring 2.5迁移到Spring 4.3,此错误无法解决:
o.s.web.servlet.PageNotFound - No mapping found for HTTP request with URI [/mcbm-web-2.3.0-SNAPSHOT/mcbm/rpc/statistic.rpc] in DispatcherServlet with name 'rpc'.
我的web.xml:
`
<display-name>MCBM</display-name>
<welcome-file-list>
<welcome-file>indexRedirect.jsp</welcome-file>
</welcome-file-list>
<context-param>
<param-name>webAppRootKey</param-name>
<param-value>mcbm-web</param-value>
</context-param>
<context-param>
<param-name>contextConfigLocation</param-name>
<param-value>
classpath:/com/airbus/mcbm/core/spring/applicationContext-dataSource.xml
classpath:/com/airbus/mcbm/core/spring/applicationContext.xml
classpath:/com/airbus/mcbm/core/spring/applicationContext-core.xml
classpath:/com/airbus/mcbm/web/server/applicationContext-dataSource.xml
classpath:/com/airbus/mcbm/web/server/applicationContext-server.xml
</param-value>
</context-param>
<listener>
<listener-class>com.airbus.mcbm.web.server.util.GwtServletContextListener</listener-class>
</listener>
<servlet>
<servlet-name>rpc</servlet-name>
<servlet-class>org.springframework.web.servlet.DispatcherServlet</servlet-class>
</servlet>
<servlet>
<servlet-name>action</servlet-name>
<servlet-class>org.springframework.web.servlet.DispatcherServlet</servlet-class>
</servlet>
<servlet-mapping>
<servlet-name>rpc</servlet-name>
<url-pattern>*.rpc</url-pattern>
</servlet-mapping>
<servlet-mapping>
<servlet-name>action</servlet-name>
<url-pattern>*.do</url-pattern>
</servlet-mapping>
<resource-ref ....etc`
rpc-servlet.xml:
<?xml version="1.0" encoding="UTF-8"?>
<beans xmlns="http://www.springframework.org/schema/beans"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xmlns:context="http://www.springframework.org/schema/context"
xsi:schemaLocation="
http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans-4.3.xsd
http://www.springframework.org/schema/context http://www.springframework.org/schema/context/spring-context-4.3.xsd">
<context:annotation-config />
<context:component-scan base-package="com.airbus.mcbm.web.server.rpc.impl" />
<bean class="org.springframework.web.servlet.mvc.annotation.DefaultAnnotationHandlerMapping">
<property name="detectHandlersInAncestorContexts" value="true" />
<property name="useDefaultSuffixPattern" value="true" />
</bean>
<bean class="org.springframework.web.servlet.view.InternalResourceViewResolver">
<property name="viewClass" value="org.springframework.web.servlet.view.JstlView"/>
<property name="prefix" value="/WEB-INF/jsp/"/>
<property name="suffix" value=".jsp"/>
</bean>
<bean class="org.springframework.web.servlet.handler.SimpleServletHandlerAdapter" />
<bean class="org.springframework.web.servlet.handler.SimpleServletPostProcessor" />
<bean class="org.springframework.web.servlet.handler.SimpleMappingExceptionResolver">
<property name="defaultErrorView" value="error-general" />
</bean>
`
@RemoteServiceRelativePath("rpc/statistic.rpc")
上的路径
我指定它可以在spring 2.5.
我随时为您提供更多信息。
预先感谢您的帮助。
解决方法
暂无找到可以解决该程序问题的有效方法,小编努力寻找整理中!
如果你已经找到好的解决方法,欢迎将解决方案带上本链接一起发送给小编。
小编邮箱:dio#foxmail.com (将#修改为@)