SpringCloud报错:

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

解决方案:

Discovery的包有两个,导入 org.springframework.cloud.client.discovery.DiscoveryClient才是正确的。

												

SpringCloud报错: "Field discoveryClient in com.controller.DcController required a bean of type 'com.netflix.discovery.DiscoveryClient' that could not be found."的更多相关文章

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

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

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

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

  7. springcloud报错:org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'armeriaServer' defined in class path resource

    spring boot配置zipkin 无法启动 加入 Zipkin Server 由于需要收集 Spring Cloud 系统的跟踪信息,以便及时地发现系统中出现的延迟升高问题并找出系统性能瓶颈的根 ...

  8. SpringCloud报错:Caused by: org.yaml.snakeyaml.parser.ParserException: while parsing MappingNode

    今天在配置eureka集群时,SpringCloud报错如下: Caused by: org.yaml.snakeyaml.parser.ParserException: while parsing ...

  9. SpringCloud报错:Caused by: org.springframework.context.ApplicationContextException: Unable to start EmbeddedWebApplicationContext due to missing EmbeddedServletContainerFactory bean.

    今天启动用eureka的服务消费者时,一直出现问题. SpringCloud报错: Caused by: org.springframework.context.ApplicationContextE ...

随机推荐

  1. mysqld服务启动失败, Failed to restart mysqld.service: Unit not found.

    -bash-4.2# service mysqld restart Redirecting to /bin/systemctl restart mysqld.serviceFailed to rest ...

  2. 坑爹的myeclipse 的tomcat 重部署 redeploy !

    启动 tomcat 出现: Caused by: org.springframework.beans.factory.BeanCreationException: Error creating bea ...

  3. 《锋利的JQuery》中重写超链接与图片提示效果

    代码部分: <!DOCTYPE html> <html> <head> <meta charset="utf-8"> <met ...

  4. 1. 配置win7下odbc数据源找不到数据库驱动的问题

    win7下ODBC数据源DB2的链接 直接在控制面板---管理工具----数据源(ODBC) 打开数据源配置,发现只有SQLServer的驱动,其他的都没有了. 解决方法是C:\Windows\Sys ...

  5. Flex4学习笔记2--代码保存在单独的文件中

    1 <!--调用外部as文件--> <fx:Script> <![CDATA[ import mx.controls.Alert; import a.Test3; ]]& ...

  6. PHP + Apche 在 window 系统下的环境搭建

    1, 安装 Apche 服务器, 官方只提供源码,这里推荐三方下载地址 http://www.apachelounge.com/download/ 1.1,下载后解压到自己想要安装的位置, 笔者安装在 ...

  7. Delphi 修改本地日期和时间

    procedure TForm1.ModifySysdate(D: Double); var systemtime:Tsystemtime; DateTime:TDateTime; begin Set ...

  8. UNITY2018 真机开启deepprofiling的操作

    手机上运行游戏并开启deepprofiling的命令如下 命令一:adb shell am start -n com.szyh.YHP1.kaopu/com.szyh.YHP1.kaopu.MainA ...

  9. 多线程(Java)

    Thread 类 和 Runnable 接口 在Java中实现多线程有两种方法 继承 Thread 类 优点:通过覆盖Thread 类的方法,可以改变线程的行为. 实现 Runnable 接口 优点: ...

  10. qurtz.net(转载)

    Quartz+TopShelf实现Windows服务作业调度   Quartz:首先我贴出来了两段代码(下方),可以看出,首先会根据配置文件(quartz.config),包装出一个Quartz.Co ...