1.檢查static資源文件是否在resource文件下
2.applicatiin.properties中加入
spring.web.resources.static-locations=classpath:/resources/,classpath:/static/,classpath:/templates/
3.引入格式錯誤
<script src="../static/layui/layui.js"></script>
正確:<script src="../layui/layui.js"></script>