微服务配置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进行指定应该如下:

复制代码
<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>
相关推荐
高松燈9 小时前
若伊项目学习 后端分页源码分析
后端·架构
容器魔方10 小时前
Volcano v1.12 正式发布!驱动云原生AI与批量计算向智能高效新阶段演进
云原生·容器·云计算
维基框架11 小时前
Spring Boot 项目整合Spring Security 进行身份验证
java·架构
水泥工boss12 小时前
🚀微前端与模块联邦的深度结合(基于vue+vite)
前端·架构
在未来等你14 小时前
互联网大厂Java求职面试:云原生架构与微服务设计中的复杂挑战
java·微服务·ai·云原生·秒杀系统·rag·分布式系统
zfj32114 小时前
什么时候使用微服务,什么时候不用
微服务·架构
程序猿DD15 小时前
告别微服务,迎接SCS(Self-Contained Systems)?新概念还是炒冷饭?
后端·微服务·架构
曼岛_15 小时前
[架构之美]解决Windows 10主机与Windows 10虚拟机之间无法拖拽复制问题
windows·架构
腾讯云中间件16 小时前
限流系列之一:微服务常见限流方案及TSF限流原理
微服务·腾讯
season_zhu16 小时前
RxSwift:这可能是Notification最优雅的封装方式之一了
ios·架构·rxswift