在写客户端程序的时候,总是报'com.netflix.discovery.DiscoveryClient' that could not be found。

原因在于导入了错误的类:com.netflix.discovery.DiscoveryClient

应该是引用:org.springframework.cloud.client.discovery.DiscoveryClient

springcloud-3: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. spring eureka required a bean of type 'com.netflix.discovery.DiscoveryClient' that could not be found.

    spring在集成第三方过程很容易出现类名相同,且基本作用相同的类.这样给初学者带来一定的困惑. 导致用错类而出现以下问题. required a bean of type 'com.netflix. ...

  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. a commponent required a bean of type XXXXXX that could not be found-2022新项目

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

  5. 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 ...

  6. 2. springboot启动报错:Field userMapper in com.service.UserService required a bean of type 'com.dao.UserMapper' that could not be found.

    报错信息: 2018-06-25 14:26:17.103  WARN 49752 --- [  restartedMain] ationConfigEmbeddedWebApplicationCon ...

  7. 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 ...

  8. 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 ...

  9. 解决办法 Field userService in com.sxsj.controller.RegistLoginController required a bean of type

    转自:https://blog.csdn.net/awmw74520/article/details/82687288 APPLICATION FAILED TO START Error starti ...

随机推荐

  1. mysql引擎,完整的见表语句,数据库模式, 常用数据类型,约束条件

    引擎 show engines : 查看引擎 innodb(默认引擎):支持事务,行级锁,外键 myisam:查询效率由于innodb,不需要支持事务,行级锁,外键,可以选用myisam来优化数据库 ...

  2. 搭建 consul 集群

    =============================consul 命令行工具=============================consul 支持 Windows/Linux 等多种平台, ...

  3. SQL Server进阶(十一)可编程对象——变量、 批、流元素、 游标

    变量 --------------------------------------------------------------------- -- Variables -------------- ...

  4. Python中json一点小知识

    import json dic={ "name":"杨林" } ret=json.dumps(dic,ensure_ascii=False) #因为json.d ...

  5. termios结构体各成员的值(FreeBSD 12.0)

    一.文件位置 /usr/include/sys/_termios.h 二.文件内容 /*- * SPDX-License-Identifier: BSD-3-Clause * * Copyright ...

  6. transition过渡动画

    过渡动画必须写在<transition></transition>标签内,配合其他标签使用. 例子: <transition name="fade" ...

  7. 第26月第8天 android studio 国内

    1. //东软信息学院 mirrors.neusoft.edu.cn 80   使用方法: 启动 Android SDK Manager ,打开主界面,依次选择「Tools」.「Options…」,弹 ...

  8. IE9浏览器打开开发者工具代码正常执行,反之报错

    1.can i use console  IE9开发者工具打开时支持console对象,否则报错. 2.由于出现错误 80020101 而导致此项操作无法完成 测试代码 <!DOCTYPE ht ...

  9. java解压缩zip

    依赖的包: <!-- https://mvnrepository.com/artifact/org.apache.ant/ant --> <dependency> <gr ...

  10. MVC_Route层层深入

    1.前期准备 新建一个MVC项目,并添加Home和About两个控制器 在这两个控制器对应添加index页面 namespace Study_MVC_Route.Controllers { publi ...