微服务配置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>
相关推荐
凯子坚持 c20 小时前
通往Docker之路:从单机到容器编排的架构演进全景
docker·容器·架构
没有bug.的程序员1 天前
服务网格 Service Mesh:微服务通信的终极进化
java·分布式·微服务·云原生·service_mesh
西陵1 天前
Nx带来极致的前端开发体验——任务缓存
前端·javascript·架构
roshy1 天前
x86、arm、rsc-v指令集架构,指令集、OS、应用3者的关系
java·arm开发·架构
啊啊啊啊8431 天前
Kubernetes 1.20集群部署
云原生·容器·kubernetes
科技百宝箱1 天前
03-AI Agent全栈架构系统化落地指南
人工智能·架构
趣味编程1111 天前
物联网系统三层架构解析
物联网·架构
mit6.8241 天前
[Backstage] 认证请求的流程 | JWT令牌
架构
Jabes.yang1 天前
Java大厂面试实录:从Spring Boot到微服务的技术探讨
java·spring boot·spring cloud·微服务·技术面试
忧郁的橙子.1 天前
十二、kubernetes 1.29 之 存储 Volume、pv/pvc
云原生·容器·kubernetes