2014-11-25 128 views
0

當我和春天3.0.1我的應用程序運行良好的工作,錯誤彈簧3.1.2

當我把它chenged 3.1.2現在我hiting URL-http://localhost:8080/nated /遷移時收到錯誤

2014年11月25日下午6點43分02秒org.springframework.web.servlet.DispatcherServlet noHandlerFound 警告:否的DispatcherServlet找到HTTP請求與URI [/ NAT的/遷移]名爲 '調度'

映射這裏是調度員servlet-

<?xml version="1.0" encoding="UTF-8"?> 
<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" 
    xsi:schemaLocation=" 

    http://www.springframework.org/schema/mvc http://www.springframework.org/schema/mvc/spring-mvc-3.0.xsd 
     http://www.springframework.org/schema/beans  
     http://www.springframework.org/schema/beans/spring-beans-3.0.xsd 
     http://www.springframework.org/schema/context 
     http://www.springframework.org/schema/context/spring-context-3.0.xsd"> 

    <context:component-scan base-package="com.nated.app.migration.controller" /> 
    <bean id="viewResolver" class="org.springframework.web.servlet.view.InternalResourceViewResolver"> 
     <property name="prefix" value="/WEB-INF/natedjsp/"/> 
     <property name="suffix" value=".jsp"/> 
    </bean> 
    <mvc:resources mapping="/resources/**" location="/resources/css/" /> 
</beans> 

請提出一些解決方法。

,這裏是我的web.xml

<web-app xmlns="http://java.sun.com/xml/ns/javaee" 
     xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" 
    xsi:schemaLocation="http://java.sun.com/xml/ns/javaee 
      http://java.sun.com/xml/ns/javaee/web-app_2_5.xsd" 
    version="2.5"> 

    <display-name>migration</display-name> 

    <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/application-context.xml</param-value> 
    </context-param> 
<!-- Creates the Spring Container shared by all Servlets and Filters --> 
    <listener> 
     <listener-class>org.springframework.web.context.ContextLoaderListener</listener-class> 
    </listener> 
</web-app> 

以前的應用程序正在運行的精絕3.0.1我改成了3.1.2,支持MVC:資源,但現在它給錯誤現在

回答

0

其解決我在調度程序servlet中缺少<mvc:annotation-driven />