spring在集成第三方过程很容易出现类名相同,且基本作用相同的类。这样给初学者带来一定的困惑。

导致用错类而出现以下问题。

  required a bean of type 'com.netflix.discovery.DiscoveryClient' that could not be found.

此问题就是我们错误的使用了netflix的DiscoveryClient,而非spring的。

解决方案:

  换成spring的类,好啰嗦呀。

详细

  https://stackoverflow.com/questions/42845084/cannot-find-discoveryclient-bean-error-in-spring-boot

spring eureka required a bean of type 'com.netflix.discovery.DiscoveryClient' that could not be found.的更多相关文章

  1. SpringCloud报错: "Field discoveryClient in com.controller.DcController required a bean of type 'com.netflix.discovery.DiscoveryClient' that could not be found."

    SpringCloud报错: "Field discoveryClient in com.controller.DcController required a bean of type 'c ...

  2. springcloud-3:required a bean of type 'com.netflix.discovery.DiscoveryClient' that could not be found.

    在写客户端程序的时候,总是报'com.netflix.discovery.DiscoveryClient' that could not be found. 原因在于导入了错误的类:com.netfl ...

  3. Spring Cloud Ribbon负载均衡配置类放在Spring boot主类同级增加Exclude过滤后报Field config in com.cloud.web.controller.RibbonConfiguration required a bean of type 'com.netflix.client.config.IClientConfig' that could not b

    环境: Spring Cloud:Finchley.M8 Spring Boot:2.0.0.RELEASE 目录结构: 可以看到代码第13行的注释,我已经在@ComponentScan注解中添加了E ...

  4. maven多模块启动required a bean of type com.xxx.xxx.service that could not be found.

    Description: Field testService in com.xxx.xxx.api.controller.TestController required a bean of type ...

  5. Field userService in com.wuji.controller.UserController required a bean of type 'com.wuji.service.UserService' that could not be found

    Field userService in com.wuji.controller.UserController required a bean of type 'com.wuji.service.Us ...

  6. Field redisTemplate in xxxxxx required a bean of type 'org.springframework.data.redis.core.RedisTemplate' that could not be found.

    *************************** APPLICATION FAILED TO START *************************** Description: Fie ...

  7. 解决:Field xxMapper in xx.service.impl.xxServiceImpl required a bean of type 'xx.mapper.xxMapper'

    1.启动 SpringBoot项目报错,使用的是Springboot.Spring.Mybatis连接Mysql数据库,启动SpringBoot项目报错,错误如下所示: _____ .__/\ .__ ...

  8. a commponent required a bean of type XXXXXX that could not be found-2022新项目

    一.问题由来 目前刚入职一家新公司不久,公司的新项目采用DDD驱动领域设计来进行开发,架构这一块使用的是阿里巴巴开源的最新框架COLA4.0的架构. 主要是这个框架里面的分层设计.主要分为四层:ada ...

  9. Sping Cloud项目启动报A component required a bean of type 'com.tianyan.bbc.dao.SecurityUserBaseMapper' that could not be found.

    项目构建正常,启动和Debug报以下错误: Error starting ApplicationContext. To display the conditions report re-run you ...

随机推荐

  1. 框架:Lucene.net

    Lucene.net 性能<第八篇> 摘要: 一.IndexReader性能分析 IndexReader完成了打开所有索引文件和提供底层reader API等繁重的工作,而IndexSea ...

  2. bzoj1572

    题解: 每一次不能满足的时候 找一个之前有过的 然后最小的 和他替换 代码: #include<bits/stdc++.h> using namespace std; ; long lon ...

  3. Flask初级(二)为flash创建路由,访问路径。

    Project name :Flask_Plan 上一篇文章,我们创建了默认的flask项目,也可以运行起来. 但是只有一个首页,只显示一个hello world. 现在我们创建访问路由,也就是访问地 ...

  4. SharePoint SSS(Security Store Service)服务-PowerShell

    1. 获取SSS应用程序的标识 Get-SPServiceApplication 2. 获取指定的SSS应用程序实例 $sss = Get-SPServiceApplication -Identity ...

  5. SharePoint 服务应用程序管理-PowerShell

    1. 安装所有可用的服务应用程序 Install-SPService -Provision 2. 显示场中所有可用的服务应用程序 Get-SPServiceApplication 3. 获取指定的服务 ...

  6. 由pg_xlogdump统计信息想到的问题

    最近深入理解了Checkpoint的相关逻辑,再来看WAL日志的一些设置,又有了新的收获. 1.回顾pg_xlogdump出来的wal日志信息: 2.wal中FPI的占比很高问题分析: 3.重申ful ...

  7. django2 删除图片或其他

    首先从数据库中获取图片的名称,然后拼接图片的物理地址,最后就是删除. # 物理删除图片 d = os.path.dirname(os.path.dirname(os.path.abspath(__fi ...

  8. postman--安装及Interceptor插件

        1. 官网安装(看网速-我下载的时候一直下载失败) 打开官网,https://www.getpostman.com 选择ios或者win 2. 非官网安装 https://pan.baidu. ...

  9. hadoop之HDFS运行小观察

    hadoop 是当前很火的一个  大数据运行框架和平台, 对于这个神奇的大家伙我甚是搞不清楚,前段时间闲来无视便把 HADOOP 运行起来, 看着它的操作记录存储部分(操作日志), IMAGE 记录着 ...

  10. 【计算机视觉】ARM平台实现人脸检测YSQfastfd

    ARM平台实现于仕琪人脸检测库YSQfastfd 平台要求 ARM32 platform hardware board Ubuntu 16.04 with GTK3 library USB camer ...