SpringBoot融合Thymeleaf中template文件夾&訪問靜態資源 & Springboot打包成jar包后訪問不到template模板


💊Thymeleaf相關配置

#thymeleaf start
spring.thymeleaf.mode=HTML
spring.thymeleaf.encoding=UTF-8
spring.thymeleaf.content-type=text/html
#開發時關閉緩存,不然沒法看到實時頁面
spring.thymeleaf.cache=false
# 定位模板的目錄 
spring.mvc.view.prefix=classpath:/templates/
# 給返回的頁面添加后綴名
spring.mvc.view.suffix=.html
#thymeleaf end

SpringBoot中template文件夾📂訪問靜態資源 參考連接: https://www.cnblogs.com/kingsonfu/p/11516967.html

Springboot打包成jar包后訪問不到template模板 參考連接: https://blog.csdn.net/lei_da_gou/article/details/81178188


免責聲明!

本站轉載的文章為個人學習借鑒使用,本站對版權不負任何法律責任。如果侵犯了您的隱私權益,請聯系本站郵箱yoyou2525@163.com刪除。



 
粵ICP備18138465號   © 2018-2025 CODEPRJ.COM