springboot 配置 spring cloud 时的注意事

2020-04-08  本文已影响0人  joy悦_06e8

在配置springboot + springCloud完成后,启动时会报错:


屏幕截图(126).png

报错信息为:
org.thymeleaf.exceptions.TemplateInputException: Error resolving template [eureka/status], template might not exist or might not be accessible by any of the configured Template Resolvers

这是因为eureka的默认模板为freemaker 而不是 thymeleaf
这就需要在application.yml中配置:
spring:
freemarker:
prefer-file-system-access: false

添加完成后重启即可。

上一篇 下一篇

猜你喜欢

热点阅读