参考地址:
Maven引入nacos的版本问题以及如何在阿里Maven仓库中找到想要的jar和Maven中的groupId、artifactId、version_cannot resolve com.alibaba.cloud:spring-cloud-star-CSDN博客
pom文件中报错:
Could not find artifact com.alibaba.cloud:spring-cloud-starter-alibaba-nacos-discovery:pom:unknown in spring-milestones (https://repo.spring.io/milestone) Could not find artifact com.alibaba.cloud:spring-cloud-starter-alibaba-nacos-discovery:pom:unknown i
解决方案:
Maven中Could not find artifact XXXX和引入alibaba.cloud依赖_could not find artifact com.alibaba.cloud:spring-c-CSDN博客
在Maven引入alibaba.cloud依赖时,可在父类pom进行指定应该如下:
<dependencyManagement><dependencies><!-- 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></dependencies></dependencyManagement>