本文共 662 字,大约阅读时间需要 2 分钟。
简单介绍
目前在JavaEE领域有几中比较常用的模板引擎,分别是Jsp、Velocity、Freemarker、Thymeleaf,对Freemark语法不是特别熟悉,不过对于前端页面渲染效率来说,jsp其实还是最快的,Velocity次之。Thymeleaf虽然渲染效率不是很快,但是语法方面是比较轻巧的,Thymeleaf语法比Velocity轻巧,但是渲染效率不如Velocitymaven配置
因为引入了SpringBoot的parent工程,所以不需要写版本号org.springframework.boot spring-boot-starter-thymeleaf
application.yml配置
#添加Thymeleaf配置 thymeleaf: cache: false prefix: classpath:/templates/ suffix: .html mode: HTML5 encoding: UTF-8 content-type: text/html
application.yml:
server: port: 8081#logging:# config: classpath:logback_spring.xml.bat# level:# com.muses.taoshop: debug# path: /data/lo
转载地址:http://zfcof.baihongyu.com/