SPRINGBOOT5--html模板应用

1.项目路径resource下都是存放静态资源,static可存放图片,templates则是存放html模板,模板修改之后需重启服务器才能生效

2.模板必须放在templates下并且引入,pom中引入

<dependency>
<groupId>org.springframework.boot</groupId>
 <artifactId>spring-boot-starter-thymeleaf</artifactId>
</dependency>
3.controller

猜你喜欢

转载自www.cnblogs.com/ajax-li/p/9116567.html