问题描述:Servlet3模块化应用中,@Controller没有被注入,导致出现:

org.springframework.web.servlet.DispatcherServlet noHandlerFound

警告:No mapping found for HTTP request with URI [/xxx/xxx] in DispatcherServlet with name 'springmvc'

特别说明:在独立的站点应用中不会存在这个问题。

 

警告: No mapping found for HTTP request with URI [/wrbots%2Dit%2Dweb%2D10%2D20180410/registerView] in DispatcherServlet with name 'springMVC'

解决方案:

把spring的配置文件放在一起。例如:都放在src/main/resources下的config文件夹中

 

另一种错误情况,配置文件中写错了路径

实际文件夹是conf,配置中却写成了config,当然找不到了。

 

posted on 2018-04-12 01:18  god with us  阅读(327)  评论(0编辑  收藏  举报