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代码。
  




  
    
作者:独而不孤

-------------------------------------------

个性签名:独学而无友,则孤陋而寡闻。做一个灵魂有趣的人!

如果觉得这篇文章对你有小小的帮助的话,记得在右下角点个“推荐”哦,博主在此感谢!

万水千山总是情,打赏一分行不行,所以如果你心情还比较高兴,也是可以扫码打赏博主,哈哈哈(っ•̀ω•́)っ✎⁾⁾!

喂一下的我仓鼠谢谢
原文地址:https://www.cnblogs.com/lcaiqin/p/10415417.html