當(dāng)前位置:
首頁(yè) >
前端技术
> javascript
>内容正文
javascript
Spring boot的Thymeleaf使用
生活随笔
收集整理的這篇文章主要介紹了
Spring boot的Thymeleaf使用
小編覺(jué)得挺不錯(cuò)的,現(xiàn)在分享給大家,幫大家做個(gè)參考.
Thymeleaf使用
引入Thymeleaf
<dependency><groupId>org.springframework.boot</groupId><artifactId>spring-boot-starter-thymeleaf</artifactId> </dependency>版本配置
<thymeleaf.version>3.0.9.RELEASE</thymeleaf.version> <thymeleaf-layout-dialect.version>2.2.2</thymeleaf-layout-dialect.version>添加頁(yè)面
HTML頁(yè)面放在classpath:/templates/路徑下
thymeleaf就能自動(dòng)渲染
命名空間
在HTML文檔頭部,導(dǎo)入命令空間
總結(jié)
以上是生活随笔為你收集整理的Spring boot的Thymeleaf使用的全部?jī)?nèi)容,希望文章能夠幫你解決所遇到的問(wèn)題。
- 上一篇: Spring boot模板引擎
- 下一篇: gradle idea java ssm