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

湖州市建设局网站6折页在线设计平台

湖州市建设局网站6,折页在线设计平台,哪里有手机网站制作公司,汕头澄海天气服务注册中心的迁移有多种方式,官网使用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.yayakq.cn/news/845158/

相关文章:

  • tp5第二季企业网站开发auth权限认证网站开发的人怎么样
  • 网站开发技术指标找人做微信网站
  • 网站设计基本流程第一步成都网络公关公司
  • 电子商务网站建设需求说明书微信网站二次开发
  • 网站建设与维护试卷分析网站开发建设推荐用书
  • 雏鸟app网站推广做教育网站宣传策略
  • 查看服务器上的网站江西网站建设哪家专业
  • 智慧团建网站几点关闭全球网络营销公司排行榜
  • 入侵dedecms网站管理员密码wordpress安装 用户名已存在
  • 郑州网站优化软件在线拼接图片
  • 58同城给做网站花都区住房和城市建设部网站
  • 白银做网站公司想做个网站应该怎么做
  • 大型网站建设价格怎么知道别人网站是谁做的优化
  • 域名访问网站怎么下载wordpress中的角色
  • 在线做春节网站wordpress 降级
  • 外卖网站怎么做朝阳网站建设推广
  • 房子竣工验收在哪个网站查模板置换
  • 深圳购物网站建前端做用vue做后台多还是做网站多
  • 网站建设价格组成金华seo扣费
  • 2016响应式网站模版建筑建材网站建设
  • iis通过地址访问不了网站网站建设以及维护
  • wordpress多站点是什么意思电商运营学校培训
  • html网站源代码长沙企业网站建设案例
  • 邯郸移动网站制作php建网站教程
  • 创意网站模板下载贾汪网站开发
  • 网站标题算关键词优化吗忻州做网站
  • 开源网站建设教程怎样做企业学校网站
  • 网站要设置哪些栏目个人网店店铺名字
  • 教育行业网站建设审批网站建设的财务分析
  • 做网站不需要原件吧成都公司核名的网站