这两天使用springMvc时候,一直使用不上jQuery
以下是报错
Failed to load resource: the server responded with a status of 404 ()
response.jsp:10 Uncaught ReferenceError: $ is not defined
at response.jsp:10
response.jsp:6 GET http://localhost/springmvc_02_response/js/jquery-3.3.1.min.js net::ERR_ABORTED 404
Navigated to http://localhost/springmvc_02_response/response.jsp
response.jsp:10 Uncaught ReferenceError: $ is not defined
错误的原因是 xml文件中没有配置静态资源不过滤
加上<mvc:resource location="/js/" maping="/js/**"> 便可以使用jQuery