spring boot结合thymeleaf

1.在pom文件中加入thymeleaf相关的依赖 spring-boot-starter-thymeleaf

2.在resource文件夹下创建 template文件夹,在template文件夹中创建模板文件

3.controller的一个方法中 返回代表模板名称的字符串,或者返回modelandview

posted @ 2016-11-29 21:07  swaggyC  阅读(215)  评论(0)    收藏  举报