Spring Cloud Alibaba 0.9.0升级到2.1.0报错问题 解决方法

2020-05-15T01:21:00

将Spring Cloud Alibaba 的版本号0.9.0.RELEASE

<dependency>
  <groupId>org.springframework.cloud</groupId>
  <artifactId>spring-cloud-alibaba-dependencies</artifactId>
  <version>0.9.0.RELEASE</version>
  <type>pom</type>
  <scope>import</scope>
</dependency>


修改为Spring Cloud Alibaba 的版本号 2.1.0.RELEASE

<dependency>
  <groupId>com.alibaba.cloud</groupId>
  <artifactId>spring-cloud-alibaba-dependencies</artifactId>
  <version>2.1.0.RELEASE</version>
  <type>pom</type>
  <scope>import</scope>
</dependency>


[scode type="green"]把groupId以及version修改了即可。[/scode]

Spring Cloud Alibaba所有相关的Starter依赖(主要是以 spring-cloud-starter-alibaba- 开头的依赖),的groupId,全部更换成com.alibaba.cloud

例如:将:

<dependency>
  <groupId>org.springframework.cloud</groupId>
  <artifactId>spring-cloud-starter-alibaba-nacos-discovery</artifactId>
</dependency>

修改为:

<dependency>
  <groupId>com.alibaba.cloud</groupId>
  <artifactId>spring-cloud-starter-alibaba-nacos-discovery</artifactId>
</dependency>
当前页面是本站的「Baidu MIP」版。发表评论请点击:完整版 »