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 ...
随机推荐
- Vue 组件中 移动 this.$el 的注意事项
比如, mounted () { document.body.appendChild(this.$el); // insertAdjacentElement // insertBefore}, 这几行 ...
- docker(三)反正我不喜欢敲命令,daocloud.io管理你的docker,安装远程下载工具aria2 迅雷远程下载 xware
1.登录daocloud.io 2.寻找合适的镜像 3.查看镜像信息并部署,它给出了一个运行命令,其中有用的只是-V,目录映射,映射了物理服务器的/tddownload到容器的/xware/tddow ...
- USER 版本与ENG 版本差异
[Description] Android USER 版本与ENG 版本的差异 [Keyword] USER ENG user eng 用户版本 工程版本 差异 [Solution] Goog ...
- MySQL配置优化需要避免的误区
Caution: Don't overwrite your entire my.cnf at once when tuning MySQL. One or two changes per restar ...
- 一起来点React Native——常用组件之Image
一.前言 在开发中还有一个非常重要的组件Image,通过这个组件可以展示各种各样的图片,而且在React Native中该组件可以通过多种方式加载图片资源. 二.Image组件的基本用法 2.1 从当 ...
- centos 7 NAT模式网络设置
打开虚拟机.菜单栏点击‘编辑’ -> ‘虚拟网络设置’. 注意下图红色框地方的设置: 然后进入linux系统,编辑网络配置: vi /etc/sysconfig/network-scripts/ ...
- X11 fluxbox窗口管理器
/********************************************************************************* * X11 fluxbox窗口管理 ...
- TF-IDF算法(2)—python实现
参加完数模之后休息了几天,今天继续看TF-IDF算法.上篇中对TF-IDF算法已经做了详细的介绍,在此不再赘述.今天主要是通过python,结合sklearn库实现该算法,并通过k-means算法实现 ...
- [LeetCode&Python] Problem 461. Hamming Distance
The Hamming distance between two integers is the number of positions at which the corresponding bits ...
- BZOJ1076: [SCOI2008]奖励关【状压DP+期望DP】
Description 你正在玩你最喜欢的电子游戏,并且刚刚进入一个奖励关.在这个奖励关里,系统将依次随机抛出k次宝物, 每次你都可以选择吃或者不吃(必须在抛出下一个宝物之前做出选择,且现在决定不吃的 ...