Spring Boot项目的JS文件目录配置

目录

src
  └─main
          ├─java
          └─resources
                    ├─static
                    │     ├─css
                    │     ├─img
                    │     └─js
                    │           └─echarts.js
                    └─templates
                                  └─test.html

html中调用如下:

换成thymeleaf的属性则应当为th:src="@{/js/test.js}",其中的绝对地址可以换成相对地址

猜你喜欢

转载自blog.csdn.net/weixin_39285444/article/details/83743675