spring-boot + freemarker 默认配置下无法访问模板

  前提:

  • 全默认配置
  • spring-boot版本是2.2.4.RELEASE

  按照教程最简思路,整合freemarker却无法通过前端访问,下载教程demo启动却可以,显示进行配置也行,为啥??

 

 

 

   搜了下发现是spring-boot的默认配置问题,若2.0+(具体版本不知),后缀名需要显示配置:

   spring.freemarker.suffix=.ftl

 

  资料:

  https://cloud.tencent.com/developer/article/1582377

  https://www.cnblogs.com/silvestris/p/12037704.html

posted @ 2020-03-12 17:16  四方田春海  阅读(536)  评论(0编辑  收藏  举报