当前位置:   article > 正文

微服务配置nacos

微服务配置nacos

参考地址:

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进行指定应该如下:

  1. <dependencyManagement>
  2. <dependencies>
  3. <!-- spring cloud Hoxton.SR1 -->
  4. <dependency>
  5. <groupId>org.springframework.cloud</groupId>
  6. <artifactId>spring-cloud-dependencies</artifactId>
  7. <version>Hoxton.SR1</version>
  8. <type>pom</type>
  9. <scope>import</scope>
  10. </dependency>
  11. <!-- spring cloud alibaba 2.1.0.RELEASE-->
  12. <dependency>
  13. <groupId>com.alibaba.cloud</groupId>
  14. <artifactId>spring-cloud-alibaba-dependencies</artifactId>
  15. <version>2.1.0.RELEASE</version>
  16. <type>pom</type>
  17. <scope>import</scope>
  18. </dependency>
  19. </dependencies>
  20. </dependencyManagement>

声明:本文内容由网友自发贡献,不代表【wpsshop博客】立场,版权归原作者所有,本站不承担相应法律责任。如您发现有侵权的内容,请联系我们。转载请注明出处:https://www.wpsshop.cn/w/小蓝xlanll/article/detail/293147?site
推荐阅读
相关标签
  

闽ICP备14008679号