gpt4 book ai didi

java - Spring Cloud快速入门演示maven

转载 作者:太空宇宙 更新时间:2023-11-04 10:23:48 25 4
gpt4 key购买 nike

我想通过官方demo学习Spring Cloud。

https://projects.spring.io/spring-cloud/#quick-start

maven pom 看起来像这样:

<parent>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-parent</artifactId>
<version>2.0.1.RELEASE</version>
</parent>
<dependencyManagement>
<dependencies>
<dependency>
<groupId>org.springframework.cloud</groupId>
<artifactId>spring-cloud-dependencies</artifactId>
<version>Finchley.RC2</version>
<type>pom</type>
<scope>import</scope>
</dependency>
</dependencies>
</dependencyManagement>
<dependencies>
<dependency>
<groupId></groupId>
<artifactId>spring-cloud-starter-config</artifactId>
</dependency>
<dependency>
<groupId></groupId>
<artifactId>spring-cloud-starter-eureka</artifactId>
</dependency>
</dependencies><repositories>
<repository>
<id>spring-milestones</id>
<name>Spring Milestones</name>
<url>https://repo.spring.io/libs-milestone</url>
<snapshots>
<enabled>false</enabled>
</snapshots>
</repository>
</repositories>

我很困惑。 spring-cloud-starter-config 的 groupId 在哪里?当我将其复制到 intellij 时,它说 xml 标签的主体为空。我如何运行演示?

最佳答案

您添加 groupId <groupId>org.springframework.cloud</groupId>

     <dependency>
<groupId>org.springframework.cloud</groupId>
<artifactId>spring-cloud-starter-config</artifactId>
</dependency>
<dependency>
<groupId>org.springframework.cloud</groupId>
<artifactId>spring-cloud-starter-eureka</artifactId>
</dependency>

关于java - Spring Cloud快速入门演示maven,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/50785313/

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com