SpringCloud的注解:EnableEurekaClient vs EnableDiscoveryClient

What's the difference between EnableEurekaClient and EnableDiscoveryClient?

In some applications, I saw people are using EnableEurekaClient. And some other example applications are using EnableDiscoveryClient.
Is there any difference between these two?

There are multiple implementations of "Discovery Service" (eureka, consul, zookeeper).

@EnableDiscoveryClient lives in spring-cloud-commons and picks the implementation on the classpath.

@EnableEurekaClient lives in spring-cloud-netflix and only works for eureka.

If eureka is on your classpath, they are effectively the same.

上一篇:如何用Ajax实现地址栏省市级联动(数据库表数据源)


下一篇:解决ie阴影的兼容性