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>
posted @ 2021-08-07 19:03  夜未央111  阅读(40)  评论(0)    收藏  举报