在spring boot项目中碰到了前端jsp页面引用不了.js文件,参考了
http://www..com/article/518888160/
找到了解决办法,将static文件夹放在webapp下(也就是和jsp页面一个父文件夹下)spring boot 中jsp 引用静态js的问题
图为我项目中jsp页与js文件夹的位置关系。在这样配置以后到jsp页面
<script type="text/javascript" src="static/js/wangEditor.js"></script>
写成这样,在启动项目,即可看到js的效果。

相关文章:

  • 2022-01-18
  • 2021-11-02
  • 2021-11-08
  • 2022-12-23
  • 2021-12-04
  • 2021-05-24
  • 2021-10-17
  • 2021-08-14
猜你喜欢
  • 2021-04-22
  • 2022-01-18
  • 2021-08-15
  • 2021-10-12
  • 2022-12-23
  • 2022-02-06
  • 2021-08-16
相关资源
相似解决方案