当我构建我的Spring云服务器本地时。我得到了这个例外。
这是我的示例项目spring-cloud-server-demo,只需使用Application
运行我测试了git存储库使用spring cloud configserver给出的演示,它运行正常。
这是我的bootstrap.yml
spring:
application:
name: configserver
label: master
cloud:
config:
server:
bootstrap: true
git:
uri: https://github.com/tigerMoon/spConfig-repo
basedir: target/config
这是stackTrace:
org.springframework.cloud.config.server.environment.NoSuchLabelException: No such label: master
at org.springframework.cloud.config.server.environment.JGitEnvironmentRepository.refresh(JGitEnvironmentRepository.java:186) ~[spring-cloud-config-server-1.2.1.RELEASE.jar:1.2.1.RELEASE]
at org.springframework.cloud.config.server.environment.JGitEnvironmentRepository.getLocations(JGitEnvironmentRepository.java:144) ~[spring-cloud-config-server-1.2.1.RELEASE.jar:1.2.1.RELEASE]
at org.springframework.cloud.config.server.environment.MultipleJGitEnvironmentRepository.getLocations(MultipleJGitEnvironmentRepository.java:116) ~[spring-cloud-config-server-1.2.1.RELEASE.jar:1.2.1.RELEASE]
at org.springframework.cloud.config.server.environment.AbstractScmEnvironmentRepository.findOne(AbstractScmEnvironmentRepository.java:40) ~[spring-cloud-config-server-1.2.1.RELEASE.jar:1.2.1.RELEASE]
at org.springframework.cloud.config.server.environment.MultipleJGitEnvironmentRepository.findOne(MultipleJGitEnvironmentRepository.java:154) ~[spring-cloud-config-server-1.2.1.RELEASE.jar:1.2.1.RELEASE]
at org.springframework.cloud.config.server.environment.EnvironmentRepositoryPropertySourceLocator.locate(EnvironmentRepositoryPropertySourceLocator.java:50) ~[spring-cloud-config-server-1.2.1.RELEASE.jar:1.2.1.RELEASE]
at org.springframework.cloud.bootstrap.config.PropertySourceBootstrapConfiguration.initialize(PropertySourceBootstrapConfiguration.java:89) ~[spring-cloud-context-1.1.5.RELEASE.jar:1.1.5.RELEASE]