SpringBoot整合FreeMarker
1、pom.xml文件中添加依赖
代码语言:javascript复制<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-freemarker</artifactId>
</dependency>
2、application.yml 文件中添加配置
代码语言:javascript复制# FreeMarker
spring:
freemarker:
cache: false
checkTemplateLocation: true
contentType: text/html
suffix: .html
templateEncoding: UTF-8
templateLoaderPath: classpath:templates