Eureka启动异常,提示Freemarker Template Error

在启动 Eureka的时候在 DS Replicas 这部分报错,报错内容如下:

FreeMarker template error (DEBUG mode; use RETHROW in production!): The following has evaluated to null or missing: ==> replica.key [in template "eureka/navbar.ftlh" at line 68, column 62] ---- Tip: It's the step after the last dot that caused this error, not those before it. ---- Tip: If the failing expression is known to legally refer to something that's sometimes null or missing, either

更多的异常就不写了,总之是 Freemarker 的异常。 

这个应该是 spring boot 的配置文件 ,euraka 的 defaultZone 这个配置写的不规范。

注意: 这个 defaultZone 要求绝对规范才行,否则就会报 Freemarker的异常。

曾经发现的两个错误写法:

 1  defaultZone: localhost:10000/eureka  

   应该是   defaultZone: http://localhost:10000/eureka

2  defaultZone: http://eurekaServer2:8762/eureka,http://eurekaServer3:8763/eureka,

  多个 Zone ,最后多写了一个 逗号, 去掉最后的逗号就好了。


版权声明:本文为cuipy原创文章,遵循CC 4.0 BY-SA版权协议,转载请附上原文出处链接和本声明。