微服务配置nacos

参考地址:

Maven引入nacos的版本问题以及如何在阿里Maven仓库中找到想要的jar和Maven中的groupId、artifactId、version_cannot resolve com.alibaba.cloud:spring-cloud-star-****博客

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-****博客

在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>

上一篇:蓝桥--矩阵翻硬币--二分枚举


下一篇:大厂面试--[Vue&React] 对虚拟DOM的理解?虚拟DOM主要做了什么?虚拟DOM本身是什么?