1.application.yml配置
server:
port: 8082
spring:
http:
encoding.charset: UTF-8
encoding.enable: true
encoding.force: true
freemarker:
allow-request-override: false
cache: true
check-template-location: true
charset: UTF-8
expose-request-attributes: false
expose-session-attributes: false
expose-spring-macro-helpers: false
prefix:
template-loader-path: classpath:/templates/ftl/
suffix: .ftl
velocity:
allow-request-override: false
allow-session-override: false
cache: false
charset: UTF-8
check-template-location: true
content-type: text/html
enabled: true
expose-request-attributes: false
expose-session-attributes: false
expose-spring-macro-helpers: true
prefer-file-system-access: true
prefix: classpath:/templates/vm/
template-loader-path: classpath:/templates/vm/
suffix: .vm
thymeleaf:
prefix: classpath:/templates/html/
check-template-location: true
template-loader-path: classpath:/templates/html/
suffix: .html
cache: false
encoding: utf-8
mode: LEGACYHTML5
content-type: text/html
# mvc:
# view:
# check-template-location: true
# template-loader-path: classpath:/templates/jsp/
# prefix: classpath:/templates/jsp/
# suffix: .jsp
# static-path-pattern: /**
resources:
static-locations: classpath:/templates/,classpath:/META-INF/resources/,classpath:/resources/,classpath:/static/,classpath:/public/