我修改了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