警告:在DispatcherServlet中找不到带有URI [/ PMC /]的HTTP请求的映射,其名称为“spring-dispatcher”

时间:2015-07-09 05:54:34

标签: eclipse spring tomcat

我收到如下警告信息:

WARNING: No mapping found for HTTP request with URI [/PMC/] in DispatcherServlet with name 'spring-dispatcher'

这是我的spring bean定义:

<beans xmlns="springframework.org/schema/beans"; xmlns:context="springframework.org/schema/context"; xmlns:xsi="w3.org/2001/XMLSchema-instance"; xsi:schemaLocation="springframework.org/schema/beans springframework.org/schema/beans/spring-beans-2.5.xsd springframework.org/schema/context springframework.org/schema/context/spring-context.xsd">
    <context:component-scan base-package="com.PMC.hellocontroller" />

    <bean id="viewResolver" class="org.springframework.web.servlet.view.InternalResourceViewResolver" >

        <property name="prefix">
            <value>/WEB-INF/</value>
        </property>

        <property name="suffix">
            <value>.jsp</value>
        </property>
    </bean>
</beans>

1 个答案:

答案 0 :(得分:0)

请告诉我你的控制器代码。 似乎根路径上没有映射控制器方法。

请参阅Map / (root URL) in Spring MVC