标签:
问题:
项目启动点击某个页面的时候,控制台报No mapping found for HTTP request with URI
[/DZCX_Manage/host/toHostMsg.action错误。可是项目结构中有对应的CarUserController.java文件,同时定义的 有@RequestMapping("/toHostMsg");并且applicationContext.xml中配置controller扫描也正确。
如图所示:
(1)CarUserController.java
(2)applicationContext.xml中配置controller扫描(自己项目中所有的controller在com.dz.controller下)
解决办法:
后来项目启动查看控制台的日志输出发现:CarUserController.java文件中的@RequestMapping没有被扫描、注解到。然后重新remove、add项目,项目再次启动之后一切正常了。(不清楚什么原因导致第一次/host/..没有被顺序扫描到)
如图所示:
之前报No mapping found for HTTP request with URI [/DZCX_Manage/host/toHostMsg.action错误的时候,上面图片中的红色框选中的/host/...对应的controller的@RequestMapping没有被扫描、注解到。
No mapping found for HTTP request with URI [/DZCX_Manage/host/toHostMsg.action
标签:
原文地址:http://blog.csdn.net/u014746965/article/details/51339075