当前位置: 首页 > news >正文

网站建设学的是什么知识/百度网络电话

网站建设学的是什么知识,百度网络电话,两个域名指向同一个网站怎么做,出入库软件永久免费服务注册中心的迁移有多种方式,官网使用nacos sync,还有民间开发的双注册中心组件eureka-nacos-proxy,但是我用了不太顺利,所以用的是阿里巴巴的双注册中心组件edas-sc-migration-starter spring boot:2.5.3 引入依赖 …

服务注册中心的迁移有多种方式,官网使用nacos sync,还有民间开发的双注册中心组件eureka-nacos-proxy,但是我用了不太顺利,所以用的是阿里巴巴的双注册中心组件edas-sc-migration-starter

spring boot:2.5.3

  1. 引入依赖
<dependency>
    <groupId>org.springframework.cloud</groupId>
    <artifactId>spring-cloud-starter-netflix-eureka-server</artifactId>
</dependency>
<dependency>
    <groupId>org.springframework.boot</groupId>
    <artifactId>spring-boot-starter-actuator</artifactId>
</dependency>
<dependency>
    <groupId>com.alibaba.cloud</groupId>
    <artifactId>spring-cloud-starter-alibaba-nacos-discovery</artifactId>
    <version>2.0.4.RELEASE</version>
</dependency>
<!-- https://mvnrepository.com/artifact/com.alibaba.cloud/spring-cloud-starter-alibaba-nacos-config -->
<dependency>
    <groupId>com.alibaba.cloud</groupId>
    <artifactId>spring-cloud-starter-alibaba-nacos-config</artifactId>
    <version>2.0.4.RELEASE</version>
</dependency>
<dependency>
    <groupId>com.alibaba.edas</groupId>
    <artifactId>edas-sc-migration-starter</artifactId>
    <version>1.0.2</version>
</dependency>
  1. 正常启动即可发现两边都已经注册

  2. 如果要用open feign,需要在启动类排除ribbon自动配置,否则服务间调用会报错

alt
2021-08-18 16:00:58.368 ERROR 351892 --- [nio-8081-exec-1] o.a.c.c.C.[.[.[/].[dispatcherServlet]    : Servlet.service() for servlet [dispatcherServlet] in context with path [] threw exception [Handler dispatch failed; nested exception is java.lang.AbstractMethodError: org.springframework.cloud.netflix.ribbon.RibbonLoadBalancerClient.choose(Ljava/lang/String;Lorg/springframework/cloud/client/loadbalancer/Request;)Lorg/springframework/cloud/client/ServiceInstance;] with root cause

java.lang.AbstractMethodError: org.springframework.cloud.netflix.ribbon.RibbonLoadBalancerClient.choose(Ljava/lang/String;Lorg/springframework/cloud/client/loadbalancer/Request;)Lorg/springframework/cloud/client/ServiceInstance;
 at org.springframework.cloud.openfeign.loadbalancer.FeignBlockingLoadBalancerClient.execute(FeignBlockingLoadBalancerClient.java:88) ~[spring-cloud-openfeign-core-3.0.3.jar:3.0.3]

点进去可以看到 应该是负载均衡时选择服务出现错误

alt

解决方案1. 在启动类屏蔽ribbon自动配置类

alt

此时feign会默认调用nacos的服务

alt

方案2. 阿里云官网看的,但是我试了会报另一个错误,所以就采用方案1

alt

本文由 mdnice 多平台发布

http://www.jmfq.cn/news/5335579.html

相关文章:

  • 邯郸建设公司网站/北京百度关键词推广
  • 哈密建设局网站/郑州网络推广专业公司
  • 江西省网站建设先进表彰/万能导航网
  • 海绵城市建设网站/广告软文代理平台
  • 网站建设需要的服务器/无锡网站建设公司
  • 湖州品牌网站建设/网络营销培训班
  • 邯郸wap网站建设/全国唯一一个没有疫情的城市
  • 品牌网站建设小蝌蚪a/精准营销方式有哪些
  • 白城网站建设/公司的公关
  • 网站建设 盈科/谷歌官方网站首页
  • 泰安营销型网站建设公司/什么软件可以发布广告信息
  • 分类信息网站 建议 建设/软文模板
  • 大同市建设局网站/广东省各城市疫情搜索高峰进度
  • 宁波公司建设网站/网页怎么制作
  • 舟山建设网站/app制作一个需要多少钱
  • 品牌网站建设黑白H狼/免费b2b网站推广
  • 智能模板网站建设方案/推广普通话宣传周活动方案
  • 北京市海淀区网站建设/外贸建站网站推广
  • 网站建设网页开发/市场营销公司有哪些
  • 知名的政府网站建设服务商/中国联通腾讯
  • 大学生网站建设课程总结/互联网广告
  • 网站建设宣传预算/社交网络的推广方法有哪些
  • 成立中英文网站建设工作领导小组/厦门网络推广哪家强
  • 临汾尚世互联网站建设/软件外包网
  • 无锡市新吴区住房和建设交通局网站/西安网
  • 苏州建设培训中心网站/口碑好网络营销电话
  • 网站还在建设中av/zac seo博客
  • 网站建设文翻译工作室/百度指数如何分析数据
  • 专业建设网站应该怎么做/湖南网站建设加盟代理
  • 顺企网杭州网站建设/对seo的理解