1.引入依赖
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-freemarker</artifactId>
</dependency>
2.application.yml
freemarker:
suffix: .ftl
check-template-location: true
content-type: text/html
charset: UTF-8
template-loader-path: classpath:/templates/
cache: false
enabled: true