Thymeleaf

Thymeleaf


使用:

  1. 导入start依赖
  <!--SpringBoot导入-->
  <dependency>
    <groupId>org.springframework.boot</groupId>
    <artifactId>spring-boot-starter-thymeleaf</artifactId>
  </dependency>
  <!--非springboot导入-->
  <dependency>
      <groupId>org.thymeleaf</groupId>
      <artifactId>thymeleaf</artifactId>
      <version>2.1.4</version>
  </dependency>
  1. html页面加入约束
  2. 之后可以使用Tamplate 放入html
    Thymeleaf是一个模板引擎,可以替代jsp

语法:后续添加

posted @ 2021-03-12 19:40  —清风碎心—  阅读(34)  评论(0编辑  收藏  举报