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