我是新来的春天云的概念,并随后每通过spring.io无法下载/导入包org.springframework.cloud.config.server.EnableConfigServer
https://spring.io/guides/gs/centralized-configuration/提供春云文件中的每一步
奇怪的是,当我在spring-cloud上执行clt + space时 - 在我的STS中,我看不到任何选项在pom.xml文件中添加spring-cloud-starter-config依赖项,因此我无法无法在我的课程文件中导入包org.springframework.cloud.config.server.EnableConfigServer
。我不明白这是什么原因,为什么会这样。
这里是我的配置细节:
STS:3.9.0
的Maven:3.5.0
的Java:8
编辑1:添加甲醛。 xml文件
<?xml version="1.0" encoding="UTF-8"?>
http://maven.apache.org/xsd/maven-4.0.0.xsd“> 4.0.0
<groupId>com.example</groupId>
<artifactId>MicroServices</artifactId>
<version>0.0.1-SNAPSHOT</version>
<packaging>jar</packaging>
<name>MicroServices</name>
<description>Demo project for Spring Boot</description>
<parent>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-parent</artifactId>
<version>1.5.2.RELEASE</version>
<relativePath /> <!-- lookup parent from repository -->
</parent>
<properties>
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
<java.version>1.8</java.version>
</properties>
<dependencies>
<dependency>
<groupId>org.springframework.cloud</groupId>
<artifactId>spring-cloud-</artifactId> <!-- Here I don't see option to download spring-cloud-starter-config -->
</dependency>
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-test</artifactId>
<scope>test</scope>
</dependency>
</dependencies>
<dependencyManagement>
<dependencies>
<dependency>
<groupId>org.springframework.cloud</groupId>
<artifactId>spring-cloud-dependencies</artifactId>
<version>Camden.SR5</version>
<type>pom</type>
<scope>import</scope>
</dependency>
</dependencies>
</dependencyManagement>
<build>
<plugins>
<plugin>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-maven-plugin</artifactId>
</plugin>
</plugins>
</build>
如果有人回答我的问题将是非常有益的多。
我已经将bom的详细信息添加到了我的pom中。用pom.xml更新了问题。 –
我已经清理m2 repo并改变了pom bit.And解决方案也增加了。 –