SpringBoot——無法訪問templater下的ftl文件

添加配置文件信息

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
發表評論
所有評論
還沒有人評論,想成為第一個評論的人麼? 請在上方評論欄輸入並且點擊發布.
相關文章