spring eureka required a bean of type 'com.netflix.discovery.DiscoveryClient' that could not be found.
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.的更多相关文章
- 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 ...
- 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 ...
- 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 ...
- 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 ...
- 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 ...
- 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 ...
- 解决:Field xxMapper in xx.service.impl.xxServiceImpl required a bean of type 'xx.mapper.xxMapper'
1.启动 SpringBoot项目报错,使用的是Springboot.Spring.Mybatis连接Mysql数据库,启动SpringBoot项目报错,错误如下所示: _____ .__/\ .__ ...
- a commponent required a bean of type XXXXXX that could not be found-2022新项目
一.问题由来 目前刚入职一家新公司不久,公司的新项目采用DDD驱动领域设计来进行开发,架构这一块使用的是阿里巴巴开源的最新框架COLA4.0的架构. 主要是这个框架里面的分层设计.主要分为四层:ada ...
- 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 ...
随机推荐
- Python Django 前后端数据交互 之 后端向前端发送数据
Django 前后台的数据传递 严正声明:作者:psklf出处: http://www.cnblogs.com/psklf/archive/2016/05/30/5542612.html欢迎转载,但未 ...
- netstat 问题处理
MySQL SQL Writing to net Creating sort index StatisticsPreparing
- Flask初级(十一)flash与APScheduler 实现定时任务
from flask import Flask from flask_apscheduler import APScheduler # 引入APScheduler class Config(objec ...
- 利用InstallShiled 10.5制作AE应用程序安装包
[转]利用InstallShiled 10.5制作AE应用程序安装包 作者:3SNEWS 社区ESRI(ArcGIS)版版主:zhaoxiang_whuhttp://www.3snews.net/bb ...
- 插件PageHelper实现分页查询
一,需求: CommonQuery--PyQueryBean PyQueryBean:鹏飞历史记录查询,以往哪些人对征信进行了查询.CommonQuery:查询条件:根据查询人(umName).被查询 ...
- freeradius的https查询功能
一.服务器要求 Radius服务器:centos6.6.ip.hostname.selinux disabled.stop iptables freeradius版本:3.0.12 二.源码安装fr ...
- SWIFT Enumeration(2)
之前记录了Swift Enumeration(1),这篇算是它的延续吧,继续说下Enumeration,看以下定义 enum TrainStatus { case OnTime case Delay( ...
- Linux系统如何制作U盘启动盘更换系统
进入这个网站balenaEtcher,直接下载可接
- poj-1015(状态转移的方向(01背包)和结果的输出)
#include <iostream> #include <algorithm> #include <cstring> #include <vector> ...
- 洛谷 1020:导弹拦截(DP,LIS)
题目描述 某国为了防御敌国的导弹袭击,发展出一种导弹拦截系统.但是这种导弹拦截系统有一个缺陷:虽然它的第一发炮弹能够到达任意的高度,但是以后每一发炮弹都不能高于前一发的高度.某天,雷达捕捉到敌国的导弹 ...