Spring boot项目运行时出现Cannot find template location(s): [classpath:/templates/] (please add some templates, check your FreeMarker configuration, or set spring.freemarker.checkTemplateLocation=false)
这个问题可小可大。
解决方法,在项目配置文件 application.properties或者yml的里面添加一个配置
pro的
spring.freemarker.checkTemplateLocation=false
yml的
spring:
freemarker:
checkTemplateLocation: false
即可解决问题
本文解决了一个在SpringBoot项目中常见的Freemarker模板引擎配置问题,通过在配置文件中添加一行代码,即可轻松解决找不到模板位置的错误。
3万+

被折叠的 条评论
为什么被折叠?



