添加配置文件信息
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