DiscoveryClient报错:
学习spring-cloud报了一个错误:Field discoveryClient in com.controller.DcController required a bean of type 'com.netflix.discovery.DiscoveryClient' that could not be found. pom依赖为
<dependency><groupId>org.springframework.cloud</groupId><artifactId>spring-cloud-starter-netflix-eureka-client</artifactId> </dependency>
查了一下原因发现时导入包错误:@Resource private DiscoveryClient discoveryClient;有两个导入包: import org.springframework.cloud.client.discovery.DiscoveryClient; com.netflix.discovery;导入时应该导入第一个
DiscoveryClient报错:相关推荐
- idea在自动注入DiscoveryClient的时候报错
解决方法: 一.导错了包 DiscoveryClient对应有两个包: org.springframework.cloud.client.discovery.DiscoveryClient; com. ...
- spring cloudAlibaba gateway网关报错,显示无法找到注册中心注册自己。
spring cloudAlibaba gateway网关报错,显示无法找到注册中心注册自己. 1.错误提示 2020-12-29 11:10:18.521 WARN 232 --- [freshEx ...
- eureka客户端报错:was unable to send heartbeat Cannot execute request on any known server
最近新学spring-cloud,客户端注册的时候报错如下: 2022-03-30 20:25:14.141 ERROR 12208 - [tbeatExecutor-0] c.n.d.s.t.d.R ...
- Spring Boot-yaml格式,eureka客户端配置default-zone报错问题
本文为joshua317原创文章,转载请注明:转载自joshua317博客 Spring Boot-yaml格式,eureka客户端配置default-zone报错问题 - joshua317的博客 ...
- 继承WebMvcConfigurer 和 WebMvcConfigurerAdapter类依然CORS报错? springboot 两种方式稳定解决跨域问题
继承WebMvcConfigurer 和 WebMvcConfigurerAdapter类依然CORS报错???springboot 两种方式稳定解决跨域问题! 之前我写了一篇文章,来解决CORS报错 ...
- Access to XMLHttpRequest at file from origin ‘null‘ has been blocked by CORS policy谷歌浏览器本地打开项目js文件报错
Access to XMLHttpRequest at 'file:///xxxxx/PQ.BaseInfo.proto' from origin 'null' has been blocked by ...
- go build 编译报错 missing go.sum entry for module providing package
go build 编译报错 missing go.sum entry for module providing package 解决方法 // 移除未使用的依赖 go mod tidy 再次编译,就可 ...
- docker报错:driver failed programming external connectivity on endpoint, iptables:No chain by that name
docker 报错: Error response from daemon: Cannot restart container hello: driver failed programming ext ...
- mybatis查询报错:com.mysql.cj.exceptions.DataConversionException: Cannot determine value type from string
mybatis查询报错: com.mysql.cj.exceptions.DataConversionException: Cannot determine value type from strin ...
最新文章
- Apriltag可用图片:TAG16H5
- Qt creator自定义编译运行步骤
- Java 改变cmd颜色_9 个小技巧让你的 if else 看起来更优雅!
- C# 数据库系统中使用GDI+绘制柱状图
- 剖析数据库中重要而又常被曲解的概念
- 第十一届 蓝桥杯 单片机设计与开发项目 省赛 程序设计试题及源码
- 【SpringBoot 2】(五)自动配置简析源码 开发中小技巧
- JavaWeb之tomcat安装、配置与使用(一)
- SQL 年龄段 品牌分类 分组统计
- 软件工程的未来发展趋势[转载]
- python3多进程爬虫(第二卷)
- 安全验证框架使用笔记001---Shiro简介
- MySQL 存储引擎和锁
- mysql更新一条语句_讲讲一条MySQL更新语句是怎么执行的?
- 五句话搞定JavaScript作用域
- 每日自增字段mysql_2020-11-05 触发器实现mysql每日自增字段
- ansible自动运维
- windows 10 账号密码策略及规则
- linux 离线迅雷下载软件,Linux 迅雷离线客户端!!!!!!!!!!!!
- [金工实习报告]金工实习基本方法,车工/焊接/钳工/铣工/铸造/安全生产/3D打印等