访问静态资源路径报错误404
查询原因
1、在app-servlet.xml里面写
<!-- 不过滤静态资源 -->
<mvc:resources mapping="/static/**" location="/static/oc/" order="0" />
2、
<mvc:annotation-driven>不可少
3、注意上面写的那个路径 mapping 要看web.xml里面的写法 如果是
<servlet-mapping>
<servlet-name>dispatcherServlet</servlet-name>
<url-pattern>/kuafu/*</url-pattern>
</servlet-mapping>
mapping里面就不需要在写 kuafu之类的了