Caused by: org.springframework.beans.factory.UnsatisfiedDependencyException: Error creating bean with name ‘org.springframework.cloud.config.server.config.CompositeConfiguration’: Unsatisfied dependency expressed through method ‘setEnvironmentRepos’ parameter 0; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name ‘defaultEnvironmentRepository’ defined in class path resource [org/springframework/cloud/config/server/config/DefaultRepositoryConfiguration.class]: Invocation of init method failed; nested exception is java.lang.NullPointerException
解决:
server:
port: 8769
spring:
application:
name: config-server
cloud:
config:
server:
git:
uri:
search-paths: /*.properties
username:
password:
basedir: /
default-label: master
springboot2 如果有 basedir: /
就会报错。去掉就好了。
原因:待查