找不到URI gwt 2.4 spring 4的HTTP请求的映射

问题描述

有一天,我一直在为这个错误而苦苦挣扎。

通过从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 (将#修改为@)

相关问答

依赖报错 idea导入项目后依赖报错,解决方案:https://blog....
错误1:代码生成器依赖和mybatis依赖冲突 启动项目时报错如下...
错误1:gradle项目控制台输出为乱码 # 解决方案:https://bl...
错误还原:在查询的过程中,传入的workType为0时,该条件不起...
报错如下,gcc版本太低 ^ server.c:5346:31: 错误:‘struct...