在jsp引入js失败,提示404

时间:2020-12-15 15:05:31   收藏:0   阅读:49

在jsp引入js失败,提示404找不到该文件,

为什么呢?后来想起我使用的是springmvc,在配置的时候可能会影响到静态文件的使用,如js、css。

解决方法:

在springMvc配置文件springMVC-servlet.xml中加入

<mvc:annotation-driven/>

<mvc:default-servlet-handler/>

就可以了。

原文:https://www.cnblogs.com/guohu/p/14138256.html

评论(0
© 2014 bubuko.com 版权所有 - 联系我们:wmxa8@hotmail.com
打开技术之扣,分享程序人生!