添加配置文件信息
spring:
freemarker:
request-context-attribute: req
suffix: .ftl
content-type: text/html
cache: false
template-loader-path: classpath:/templates
charset: UTF-8
check-template-location: true
expose-request-attributes: false
expose-session-attributes: false
以上是完整的配置文件信息,觉得麻烦可以全部添上
如果不想全部添加的话就只添加一下两条也是可以的
spring:
freemarker:
suffix: .ftl
template-loader-path: classpath:/templates