使用spring boot template 查看html静态页面

1,首先在POM文件中引入模板引擎的jar包

<dependency>
   <groupId>org.springframework.boot</groupId>
   <artifactId>spring-boot-starter-thymeleaf</artifactId>
</dependency>
2,在application.properties中配置模板引擎

3.controller层

然后访问本地主机:8080 /索引

猜你喜欢

转载自blog.csdn.net/qq_34530405/article/details/80929321