pom.xml
<!-- 引入freeMarker的依赖包. -->
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-freeMarker</artifactId>
</dependency>
配置文件
template-loader-path: classpath:/templates/ freemarker模板所在路径

编写ftl文件

编写controller

网友评论