No mapping found for HTTP request with UR

今天搭建spring mvc的系统,成功启动后无法访问,提示如下:

No mapping found for HTTP request with URI [/admin/log.do] in DispatcherServlet 。

原因: 这一段必须写在*-servlet.xml文件中。否则就算你在配置文件中引入了所有的头文件,spring都不会管你长得多好看!

 

警示:如果我们的项目采用了springMVC,那么,组件扫描、mybatis的dao扫描最好都在这个 *-servlet.xml中指定。不然就会出现在启动时找不到Bean.

 

 

 




    
    
	
	
	
	
		   
		
		
	
    
    
   		 
        
    

  

 

 

 

 

 

For myself: 添加新的模块,必须在*-servlet.xml配置文件中 配置controller的路径 、services的路径 ,以及mybatis的dao路径 。

你可能感兴趣的:(spring)