springboot2.1.7整合thymeleaf代码怎么编写-创新互联

这期内容当中小编将会给大家带来有关springboot2.1.7整合thymeleaf代码怎么编写,文章内容丰富且以专业的角度为大家分析和叙述,阅读完这篇文章希望大家可以有所收获。

创新互联建站长期为数千家客户提供的网站建设服务,团队从业经验10年,关注不同地域、不同群体,并针对不同对象提供差异化的产品和服务;打造开放共赢平台,与合作伙伴共同营造健康的互联网生态环境。为宜阳企业提供专业的网站设计制作、成都网站制作,宜阳网站改版等技术服务。拥有十多年丰富建站经验和众多成功案例,为您定制开发。

1.在pom里面添加thymeleaf依赖

         org.springframework.boot      spring-boot-starter-thymeleaf                  nekohtml      nekohtml      ${nekohtml.version}    

2.添加application.properties配置

spring.thymeleaf.prefix=classpath:/templates/spring.thymeleaf.check-template-location=truespring.thymeleaf.suffix=.htmlspring.thymeleaf.encoding=UTF-8spring.thymeleaf.servlet.content-type=text/htmlspring.thymeleaf.mode=HTML5spring.thymeleaf.cache=falsespring.resources.chain.strategy.content.enabled=truespring.resources.chain.strategy.content.paths=/**

上述就是小编为大家分享的springboot2.1.7整合thymeleaf代码怎么编写了,如果刚好有类似的疑惑,不妨参照上述分析进行理解。如果想知道更多相关知识,欢迎关注创新互联行业资讯频道。


名称栏目:springboot2.1.7整合thymeleaf代码怎么编写-创新互联
转载来源:http://pwwzsj.com/article/cedcsj.html