springboot配置freemarker yml文件

前言

# freemarker模板引擎
spring: 
  freemarker:
	  allow-request-override: true
	  allow-session-override: true
	  cache: false
	  check-template-location: true
	  charset: UTF-8
	  content-type: text/html;
	  expose-request-attributes: true
	  expose-session-attributes: true
	  expose-spring-macro-helpers: true
	  template-loader-path: classpath:/templates/,classpath:/static/,classpath:/public/
	  prefix:
	  suffix: .html
	  request-context-attribute: request
	  settings:
	    template_update_delay: 0
	    url_escaping_charset: UTF-8
	    locale: UTF-8
	    datetime_format: yyyy-MM-dd HH:mm:ss
	    date_format: yyyy-MM-dd
	    time_format: HH:mm:ss
	    template_exception_handler: html_debug
	    # 数字格式化,无小数点
	    number_format: '0.#'
	    # 设置freemarker标签 0,1,2 0=自动识别,默认1
	    tag_syntax: 'auto_detect'
发布了48 篇原创文章 · 获赞 14 · 访问量 7万+

猜你喜欢

转载自blog.csdn.net/s1441101265/article/details/103894094
今日推荐