2、tomcat服务器的web.xml配置:
3、所以当springMVC的前端控制器配置为“/”时,需要在主配置文件中配置放行静态资源。第一种:<!-- 放行静态资源 --><mvc:resources location="/js/" mapping="/js/**"/><mvc:resources location="/css/"mapping="/js/**"/><mvc:resources location="/images/" mapping="/js/**"/>第二种:<mvc:default-servlet-handler />