thymeleaf html模块化,thymeleaf的配置

c4468b3f4df77e96b0a416fa2a870fba.png

1、在springboto项目中使用thymeleaf标签,必须先添加依赖,如下。

org.springframework.boot

spring-boot-starter-thymeleaf

2、在application.properties中配置一些常用的thymeleaf,如下。

spring.thymeleaf.prefix=classpath:/templates/ spring.thymeleaf.check-template-location=true spring.thymeleaf.suffix=.html spring.thymeleaf.encoding=UTF-8 spring.thymeleaf.content-type=text/html spring.thymeleaf.mode=HTML5 spring.thymeleaf.cache=false

可参考博客:https://blog.youkuaiyun.com/ice_lemon_g/article/details/73609020

原文链接:https://www.cnblogs.com/ming-blogs/p/10288598.html

如有疑问请与原作者联系

标签:

版权申明:本站文章部分自网络,如有侵权,请联系:west999com@outlook.com

特别注意:本站所有转载文章言论不代表本站观点,本站所提供的摄影照片,插画,设计作品,如需使用,请与原作者联系,版权归原作者所有

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值