springboot 配置 spring cloud 时的注意事项

在配置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

添加完成后重启即可。

你可能感兴趣的:(springboot 配置 spring cloud 时的注意事项)