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