1.访问html页面
application.properties中添加
spring.thymeleaf.prefix= classpath:/templates/
spring.mvc.static-path-pattern= /**
spring.resources.static-locations= classpath:/static
pom中添加下列包
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-thymeleaf</artifactId>
</dependency>
2.访问ftl页面()
pom中添加下列包
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-freemarker</artifactId>
</dependency>