1.在所有需要加載靜態資源的頁面加上如下一句話
<!-- 第一種方式:<base> 標籤爲頁面上的所有鏈接規定默認地址或默認目標 -->
<base th:href="@{/}">
2.引用靜態資源的方式
th:href="@{static/assets/css/amazeui.min.css}
3.我的springboot配置
#模板文件位置
spring.thymeleaf.prefix=classpath:/templates/
spring.resources.static-locations=classpath:/static/
spring.mvc.static-path-pattern=/static/**