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.

SpringCloud的注解:EnableEurekaClient vs EnableDiscoveryClient的更多相关文章

  1. 简单比较 @EnableEurekaClient 和 @EnableDiscoveryClient 两个注解

    @EnableEurekaClient 和 @EnableDiscoveryClient 都是让eureka发现该服务并注册到eureka的注解 相同点: 它们都能让注册中心Eureka发现 , 并将 ...

  2. vue 跨域 springCloud @CrossOrigin注解

    vue 跨域  springCloud @CrossOrigin注解 一丶什么是跨域 跨域问题来源于浏览器的同源策略,浏览器为了提高网站的安全性,在发送ajax请求时,只有在当前页面地址与请求地址的协 ...

  3. springBoot、SpringCloud 常用注解

    1,@SpringBootApplication是springboot启动类的入口注解,标注在主启动类上:2,@EnableEurekaServer 是eureka服务端启动,接受其他服务注册进来,标 ...

  4. SpringCloud常用注解

    一 @EnableDiscoveryClient,@EnableEurekaClient的区别 SpringCLoud中的“Discovery Service”有多种实现,比如:eureka, con ...

  5. SpringCloud常用注解有哪些?

    @Mapper: 注解写在你的Mapper映射接口上面 @SpringBootApplication: 写在主程序上面 @Configuration: 写在配置类上面 @Bean: 写在配置类中的返回 ...

  6. SpringCloud的注解:汇总篇

    使用注解之前要开启自动扫描功能,如下配置中base-package为需要扫描的包(含子包): 1 <context:component-scan base-package="cn.te ...

  7. 基于idea的springcloud的helloworld项目搭建过程整理

    Springcloud的搭建主要包括三个部分:服务注册中心.服务提供者.服务消费者.每一个部分都是一个springboot项目,它们通过配置文件(application.properties或appl ...

  8. spring cloud服务发现注解之@EnableDiscoveryClient与@EnableEurekaClient区别

    在使用服务发现的时候有两种注解, 一种为@EnableDiscoveryClient, 一种为@EnableEurekaClient, 用法上基本一致,下文是从stackoverflow上面找到的对这 ...

  9. spring cloud服务发现注解之@EnableDiscoveryClient与@EnableEurekaClient

    使用服务发现的时候提到了两种注解,一种为@EnableDiscoveryClient,一种为@EnableEurekaClient,用法上基本一致,今天就来讲下两者,下文是从stackoverflow ...

随机推荐

  1. linux的shell学习笔记

    shell脚本第一行写明解释器的路径: #!/bin/bash运行脚本两种方式:使用bash命令运行shell文件,或授予脚本文件执行权限,可直接执行文件shell启动时,一开始执行一组命令来定义提问 ...

  2. Path通过Selenium模拟浏览器抓取,Windows 64解决selenium.common.exceptions.WebDriverException: Message: 'geckodriver' executable needs to be in PATH.方法

    1.下载geckodriver.exe: 下载地址:https://github.com/mozilla/geckodriver/releases请根据系统版本选择下载:(如Windows 64位系统 ...

  3. kubernetes实现用户自定义扩缩容

    本文章主要参考walkthrough,aggregation和auth.涉及custom metric API的注册认证以及API server aggregation的相关知识.walkthroug ...

  4. 剖析非同质化代币ERC721-全面解析ERC721标准

    什么是ERC-721?现在我们看到的各种加密猫猫狗狗都是基于ERC-721创造出来的,每只都是一个独一无二的ERC-721代币,不过ERC-721在区块链世界远不止猫猫狗狗,它更大的想象空间在于将物理 ...

  5. docker进阶-利用dcoker Swarm搭建简单集群

    什么是Swarm   在介绍Swarm之前我们要说一下什么Docker三剑客? Docker-Machine:负责在多种平台上快速安装 Docker 环境. Docker-Compose:Docker ...

  6. React 组件间通讯

    React 组件间通讯 说 React 组件间通讯之前,我们先来讨论一下 React 组件究竟有多少种层级间的关系.假设我们开发的项目是一个纯 React 的项目,那我们项目应该有如下类似的关系: 父 ...

  7. angularJs模块ui-router之状态嵌套和视图嵌套

    原文地址:http://bubkoo.com/2014/01/01/angular/ui-router/guide/nested-states%20&%20nested-views/ 状态嵌套 ...

  8. mysql授权报错

    mysql> grant all privileges on zabbix.* to zabbix@localhost identified by '<zabbix>';ERROR ...

  9. 解决exlicpe以debug模式启动或运行速度非常慢的问题

    该问题可能是由于eclipse和tomcat的交互而产生的, 在以debug模式启动tomcat时,发生了读取文件错误, eclipse自动设置了断点,导致tomcat不能正常启动. 解决方法如下:以 ...

  10. xilinx和altera复位电平

    xilinx使用高电平复位 altera使用低电平复位 原因:Xilinx 寄存器的SR控制端是高电平有效的.如果RTL代码采用了低电平有效的复位模式,综合器将在复位信号驱动寄存器SR控制端之前的插入 ...