写成/和/*的区别
1

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 />
声明:本网站引用、摘录或转载内容仅供网站访问者交流或参考,不代表本站立场,如存在版权或非法内容,请联系站长删除,联系邮箱:site.kefu@qq.com。
阅读量:26
阅读量:164
阅读量:183
阅读量:178
阅读量:89