springboot之thymeleaf
1.thymeleaf路径

查看源码可以得到thymeleaf使用htm文件并且存放在resource下的templates文件夹下
使用时在html上方引用thymeleaf的命名空间
xmlns:th="http//www.thymeleaf.org"
2.示例
controller

html


3.thymeleaf语法
ps:引入thymeleaf依赖
<!--thymeleaf--><dependency><groupId>org.springframework.boot</groupId><artifactId>spring-boot-starter-thymeleaf</artifactId></dependency>

浙公网安备 33010602011771号