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

标签 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>

最佳答案

请告诉我你的 Controller 代码。 根路径中似乎没有映射的 Controller 方法。

请引用Map / (root URL) in Spring MVC .

关于eclipse - 警告 : No mapping found for HTTP request with URI [/PMC/] in DispatcherServlet with name 'spring-dispatcher' ,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/31309225/

相关文章:

java - 当项目部署在 tomcat 上时 JDBC 数据源不工作

java - Tomcat 出现 AccessDeniedException?

java - eclipse Windows 64位打不开

spring - 在 Hibernate 3.3.1ga 和 HSQLDB 中使用带有模式名称的 @Table

java - 在AWS上发布Springboot webapp 404索引错误

java - Spring Hibernate 只有一个 session 工厂

使用 100% 单 CPU 内核的 Java Web 应用程序

java - Eclipse 中不同的断点图标意味着什么?

eclipse - PDE 的 "Update Site Wizard"仍然是创建更新站点的正确方法吗?

java - 是否可以导入 .class 文件而不是 .jar 文件?