Spring Boot Thmeleaf的语法 day04

一、Thmeleaf语法的使用

  html格式的页面放在classpath:/templates/就会自动渲染。 
  1.在pom.xml导入
     <dependency>
            <groupId>org.springframework.boot</groupId>
            <artifactId>spring-boot-starter-thymeleaf</artifactId>
        </dependency>
  2.导入thymeleaf的名称空间
<html lang="en" xmlns:th="http://www.thymeleaf.org">
  3.在classpath:/templates中创建html代码。
  

 




 


  
    
posted @ 2019-02-21 21:23  林财钦  阅读(666)  评论(0编辑  收藏  举报