0

我试图设置 Spring Config 服务器。即使我在配置服务器应用程序的 bootstrap.yml 中提供了一个 bitbucket url,我仍然会遇到异常。

下面是我的 bootstrap.yml (config-server) 中的示例

spring.application.name: ${SPRING_APPLICATION_NAME:config-server}
sprint.cloud.config.server.git.searchPaths: '{application}'
sprint.cloud.config.server.git.uri: https://XX@bitbucketdc-dg.xyz.net/scm/abc/config-store.git
spring.cloud.config.server.git.username: XX
spring.cloud.config.server.git.password:



org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'org.springframework.boot.actuate.autoconfigure.EndpointAutoConfiguration': Bean instantiation via constructor failed; nested exception is org.springframework.beans.BeanInstantiationException: Failed to instantiate [org.springframework.boot.actuate.autoconfigure.EndpointAutoConfiguration$$EnhancerBySpringCGLIB$$282f5fb1]: Constructor threw exception; nested exception is org.springframework.beans.factory.UnsatisfiedDependencyException: Error creating bean with name 'configServerHealthIndicator' defined in class path resource [org/springframework/cloud/config/server/config/EnvironmentRepositoryConfiguration.class]: Unsatisfied dependency expressed through method 'configServerHealthIndicator' parameter 0; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'environmentRepository' defined in class path resource [org/springframework/cloud/config/server/config/EnvironmentRepositoryConfiguration$GitRepositoryConfiguration.class]: Invocation of init method failed; nested exception is java.lang.IllegalStateException: You need to configure a uri for the git repository
4

1 回答 1

0

消除:

sprint.cloud.config.server.git.searchPaths:'{应用程序}'

因为这是用于本地环境的。

于 2018-11-28T23:54:08.010 回答