欢迎来到DIVCSS5查找CSS资料与学习DIV CSS布局技术!
我目前碰到的是:
 
Could not find artifact com.alibaba.cloud:spring-cloud-alibaba-dependencies:pom:2.1.0 RELEASE in central
 
1
 
出现问题的原因其实很简单,写错了版本号!!2.1.0 RELEASE中间不该是空格而应该是。,即应该写成如下:
 
<dependencyManagement>
 
    <dependencies>
 
      <!-- 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>
 
在Maven引入alibaba.cloud依赖时,可在父类pom进行指定应该如下:
 
<!-- 子模块继承后,提供作用:锁定版本 + 子module不用写groupId和version-->
 
  <dependencyManagement>
 
    <dependencies>
 
      <!-- springBoot 2.2.2 -->
 
      <dependency>
 
        <groupId>org.springframework.boot</groupId>
 
        <artifactId>spring-boot-dependencies</artifactId>
 
        <version>2.2.2.RELEASE</version>
 
        <type>pom</type>
 
        <scope>import</scope>
 
      </dependency>
 
      <!-- spring cloud Hoxton.SR1 -->
 
      <dependency>
 
        <groupId>org.springframework.cloud</groupId>
 
        <artifactId>spring-cloud-dependencies</artifactId>
 
        <version>Hoxton.SR1</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>
 
  </dependencyManagement>
 
以上三个依赖基本都是在一起的,其中版本号自行制定即可,但一定不要写错了,不然后期很麻烦!

如需转载,请注明文章出处和来源网址:http://www.divcss5.com/html/h65251.shtml