为什么SpringCloud引导类不加@EnableDiscoveryClient也可以注册到eureka中

因为springcloud的版本不一样

1.5.8.RELEASE对应Edgeware.RELEASE---------这个是可以不使用client注解的

1.4.3.RELEASE-------------Camden.SR3---必须要加对应注解

查询原因:Dalston.SR4版本之前主函数上需要添加对应的注解;

而Edgware.RELEASE中对Eureka Client注册的优化,默认认为客户端是要完成向注册中心进行注册的。

posted on 2019-08-01 19:20  JamesHarden1121  阅读(4347)  评论(0编辑  收藏  举报