2017-05-19 127 views
0

我修改了spring-cloud-config-server-mongodb项目以使用最新版本的Spring Boot(1.5.3.RELEASE)和Spring Cloud Config(1.3.0.RELEASE)。 我还介绍了运行mongo db config服务器的类MongoConfigServer。如何使用Spring Boot(1.5.3.RELEASE)和Spring Cloud Config(1.3.0.RELEASE)编写Spring Cloud Config Server?

当我运行它,我得到这个错误:

org.springframework.beans.factory.NoUniqueBeanDefinitionException: No qualifying bean of type 'org.springframework.cloud.config.server.environment.EnvironmentRepository' available: more than one 'primary' bean found among candidates: [searchPathLocator, environmentRepository, searchPathCompositeEnvironmentRepository]

我不知道我做错了什么。如何在不出现此错误的情况下编写自己的配置服务器? 我没有看到有关如何执行此操作的任何文档。

有人可以帮助我,还是引导我?

这个mongo数据库配置服务器用于使用老版本的Spring Boot和Spring Cloud Config。 我正在使用这个Mongo DB配置服务器作为编写另一个配置服务器的例子,它也接收同样的错误。

我的弹簧云配置,服务器的MongoDB叉可在https://github.com/minmay/spring-cloud-config-server-mongodb.git

回答

相关问题