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/**