No mapping found for HTTP request with URI [/exam3/welcome.do] in DispatcherServlet with name 'XXX'
来源:互联网 发布:eureka java demo 编辑:程序博客网 时间:2024/04/30 10:03
问题:使用的 @controller,@service注解没有被扫描到
解决方案:
<!-- 配置包扫描 -->
<context:component-scan base-package="com.hps.graduation" />
必须在
<init-param>
<param-name>contextConfigLocation</param-name>
<param-value>classpath:application-mvc.xml</param-value>
</init-param>
classpath:application-mvc.xml
配置的文件里
<!-- 配置 SpringMVC 核心控制器 -->
<servlet>
<servlet-name>DispatcherServlet</servlet-name>
<servlet-class>org.springframework.web.servlet.DispatcherServlet</servlet-class>
<init-param>
<param-name>contextConfigLocation</param-name>
<param-value>classpath:application-mvc.xml</param-value>
</init-param>
<load-on-startup>1</load-on-startup>
</servlet>
<!-- 配置请求映射资源 -->
<servlet-mapping>
<servlet-name>DispatcherServlet</servlet-name>
<url-pattern>*.do</url-pattern>
</servlet-mapping>
- No mapping found for HTTP request with URI [/exam3/welcome.do] in DispatcherServlet with name 'XXX'
- No mapping found for HTTP request with URI [/login.do] in DispatcherServlet with name 'spring'
- No mapping found for HTTP request with URI [/index.do] in DispatcherServlet with name 'SpringMVC‘
- No mapping found for HTTP request with URI in DispatcherServlet with name 'XXX'
- No mapping found for HTTP request with URI [/xxx] in DispatcherServlet with name 'despatcherServlet'
- No mapping found for HTTP request with URI [/helloMvc/welcome/hello] in DispatcherServlet
- No mapping found for HTTP request with URI [/cwgl/department/index] in DispatcherServlet with name
- No mapping found for HTTP request with URI[路径] in DispatcherServlet with name spring3
- No mapping found for HTTP request with URI [/...] in DispatcherServlet with name ...的解决方法
- No mapping found for HTTP request with URI [/index.html] in DispatcherServlet with name 'springmvc'
- 警告: No mapping found for HTTP request with URI [] in DispatcherServlet with name
- Spring : No mapping found for HTTP request with URI in DispatcherServlet with name "..."
- No mapping found for HTTP request with URI [/chart/get] in DispatcherServlet with name 'SpringMVC‘
- No mapping found for HTTP request with URI [/prjName/contro] in DispatcherServlet with name 'spring'
- No mapping found for HTTP request with URI [...] in DispatcherServlet with name '...'
- No mapping found for HTTP request with URI [/bdp/] in DispatcherServlet with name
- No mapping found for HTTP request with URI [/] in DispatcherServlet with name 'projectname'
- No mapping found for HTTP request with URI [/app17a/] in DispatcherServlet with name 'springmvc'解决方法
- Android开发学习笔记(4)
- 数组算法时间复杂度
- 【NOI2017模拟4.2】查询【线段树】
- Python 实现二叉树相关操作
- OpenGL配置.NET平台
- No mapping found for HTTP request with URI [/exam3/welcome.do] in DispatcherServlet with name 'XXX'
- python的import与from...import的不同之处
- 大话设计模式读书笔记(五) 代理模式
- 深度机器学习中的batch的大小对学习效果有何影响?
- BZOJ P3294[Cqoi2011]放棋子
- 全排列 next_permutation
- N皇后问题
- JS:切换导航栏,当前导航栏样式
- 如何重置CentOS7的Root密码