当前位置: 移动技术网 > IT编程>网页制作>CSS > thymeleaf的配置

thymeleaf的配置

2019年01月19日  | 移动技术网IT编程  | 我要评论

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

<dependency>
  1. <groupid>org.springframework.boot</groupid>
  2. <artifactid>spring-boot-starter-thymeleaf</artifactid>
  3. </dependency>

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

可参考博客:

如对本文有疑问,请在下面进行留言讨论,广大热心网友会与你互动!! 点击进行留言回复

相关文章:

验证码:
移动技术网