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. sgu187&&spoj7734

    题解: splay翻转(只有翻转 sgu ac,spoj tle 代码: #pragma GCC optimize(2) #include<cstdio> #include<cstr ...

  2. Python Django 前后端数据交互 之 后端向前端发送数据

    Django 前后台的数据传递 严正声明:作者:psklf出处: http://www.cnblogs.com/psklf/archive/2016/05/30/5542612.html欢迎转载,但未 ...

  3. java maven 安装

    1.java环境安装 maven 想要安装 Apache Maven 在Windows 系统上, 需要下载 Maven 的 zip 文件,并将其解压到你想安装的目录,并配置 Windows 环境变量. ...

  4. Python获取路径下所有文件名

    python 获取当前文件夹下所有文件名   os 模块下有两个函数: os.walk() os.listdir() 1 # -*- coding: utf-8 -*- 2 3 import os 4 ...

  5. VC++实现解析快捷方式

    VC++实现解析快捷方式: http://blog.csdn.net/mydreamremindme/article/details/9826745 

  6. Java第十次作业--多线程

    一.学习要点 认真看书并查阅相关资料,掌握以下内容: 理解进程和线程的区别 掌握Java多线程的两种实现方式和区别 理解线程对象的生命周期 熟悉线程控制的基本方法 掌握Java线程的同步机制 理解多线 ...

  7. OK335xS CAN device register and deiver match hacking

    /************************************************************************* * OK335xS CAN device regi ...

  8. Linux命令行操作进程

    参见 12个进程管理命令介绍 Linux如何查看进程.杀死进程.启动进程等常用命令

  9. C# 使用GZip对字符串压缩和解压

    using System; using System.Collections.Generic; using System.Linq; using System.Text; using System.I ...

  10. socat 广播以及多播

    官方文档有一个关于组播,多播的例子挺不错,记录下 多播客户端以及服务器 注意地址修改为自己的网络 server socat UDP4-RECVFROM:6666,ip-add-membership=2 ...