3.模板引擎Thymeleaf

模板引擎Thymeleaf

①创建新项目,选择thymeleaf模板引擎和devTools开发工具和web依赖

②新建WebController文件和index模板文件

WebController.java

src/main/resources/templates/index.html

③启动测试,title已进行了解析

其他

手动直接引入依赖

修改pom.xml,添加如依赖

资料

Thymeleaf 基本用法总结

springboot(四):thymeleaf使用详解

Last updated

Was this helpful?