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代码。
  Spring Boot Thmeleaf的语法 day04

 




 


  
    

相关文章:

  • 2022-12-23
  • 2021-07-12
  • 2023-01-17
  • 2021-11-09
  • 2022-12-23
  • 2022-12-23
  • 2021-07-21
  • 2021-10-25
猜你喜欢
  • 2021-04-21
  • 2021-06-30
  • 2021-12-15
  • 2022-12-23
  • 2022-12-23
  • 2021-06-23
  • 2021-12-07
相关资源
相似解决方案