设置
<mvc:resources location="/" mapping="/resources/**"/>
之后出现以下404错误,控制台出现以下警告:
警告: No mapping found for HTTP request with URI [/yyzwgl/login] in DispatcherServlet with name 'yyzwgl'
原因是没有设置:
<mvc:annotation-driven/>
本文介绍了解决Spring MVC中因未正确配置<mvc:annotation-driven/>而导致的404错误的方法。文中提到,在设置了<mvc:resourceslocation=/mapping=/resources/**/>后出现了404错误,控制台显示了警告信息,原因是没有设置<mvc:annotation-driven/>。
设置
<mvc:resources location="/" mapping="/resources/**"/>
之后出现以下404错误,控制台出现以下警告:
警告: No mapping found for HTTP request with URI [/yyzwgl/login] in DispatcherServlet with name 'yyzwgl'
原因是没有设置:
<mvc:annotation-driven/>

被折叠的 条评论
为什么被折叠?