Spring cloud 为什么SpringCloudGettingStarted部分提供了pom.xml的无效示例?
我想问有经验的开发人员一个关于SpringCloud文档的愚蠢问题。例如,为什么它会误导我们,让我们开始一个新项目Spring cloud 为什么SpringCloudGettingStarted部分提供了pom.xml的无效示例?,spring-cloud,Spring Cloud,我想问有经验的开发人员一个关于SpringCloud文档的愚蠢问题。例如,为什么它会误导我们,让我们开始一个新项目 去 将他们的部分(pom的建议部分)包含到您的新鲜pom.xml中 请注意编译错误,例如未找到@EnableConfigServer 你真正想要的是: <dependencies> <dependency> <groupId>org.springframework.cloud</groupId> &
部分(pom的建议部分)包含到您的新鲜pom.xml中@EnableConfigServer
<dependencies>
<dependency>
<groupId>org.springframework.cloud</groupId>
<artifactId>spring-cloud-config-server</artifactId>
</dependency>
<dependency>
<groupId>org.springframework.cloud</groupId>
<artifactId>spring-cloud-starter-config</artifactId>
</dependency>
<dependencies>
org.springframework.cloud
spring云配置服务器
org.springframework.cloud
SpringCloudStarter配置
所以我的问题是,我应该如何知道如何构建正确的pom.xml来读取这些文档?我是否错过了一些东西,文档中提到了spring cloud config server的依赖关系?我认为您错过了指令的最后一段。他们说得很清楚, 要运行您自己的服务器,请使用SpringCloudConfigServer依赖项和@EnableConfigServer 这意味着您需要在pom文件中将默认的SpringCloudStarter配置更改为SpringCloudConfig服务器依赖项