【Spring Boot】jquery.js?v=1629896340433:3 GET localhost:8080/students/toPasswordPage 404

阅读: 评论:0

【Spring Boot】jquery.js?v=1629896340433:3 GET localhost:8080/students/toPasswordPage 404

【Spring Boot】jquery.js?v=1629896340433:3 GET localhost:8080/students/toPasswordPage 404


报错 GET localhost:8080/students/toPasswordPage 404

jquery.js?v=1629896340433:3 GET localhost:8080/students/toPasswordPage 404

由于 js 文件没有正确引入,导致页面的很多效果无法展示。


解决方案

  • 直接检查页面中js的引入路径:
  • 对比正常页面的路径:

通过对比发现同样引入js目录下的文件,出问题的路径中多了public目录,public是spring boot默认的静态资源文件夹之一。

关键是:${tPath} 中已经包含了 public 根目录,所以导致资源找不到,去掉public即可!

小技巧:可以把 localhost:8989/public/js/students/password.js 路径放到浏览器中,或者直接放到浏览器中,试试能不能找到资源,尝试找到正确的路径~

参考:freemarker中的${tPath}


本文发布于:2024-01-28 16:38:38,感谢您对本站的认可!

本文链接:https://www.4u4v.net/it/17064311258788.html

版权声明:本站内容均来自互联网,仅供演示用,请勿用于商业和其他非法用途。如果侵犯了您的权益请与我们联系,我们将在24小时内删除。

标签:js   jquery   Spring   Boot   http
留言与评论(共有 0 条评论)
   
验证码:

Copyright ©2019-2022 Comsenz Inc.Powered by ©

网站地图1 网站地图2 网站地图3 网站地图4 网站地图5 网站地图6 网站地图7 网站地图8 网站地图9 网站地图10 网站地图11 网站地图12 网站地图13 网站地图14 网站地图15 网站地图16 网站地图17 网站地图18 网站地图19 网站地图20 网站地图21 网站地图22/a> 网站地图23