Not much to say, directly listed on the
Pom.xml's
<dependency> <groupId>org.springframework.cloud</groupId> <artifactId>spring-cloud-config-server</artifactId> </dependency>
YML configuration settings
Spring
Application:
Name:xxx
Cloud
Config
Server
Git:
Uri:git Address
Searchpaths: Sub-Directory
Username: Account Number
Password: password
On the startup class, add
@EnableConfigServer
The most important thing is not to add profiles to this property.
Plus this profiles will be affected by the error.
You need to configure a URI for the Git repository
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 $ $a 51a7dda]: Constructor threw exception; Nested exception is org.springframework.beans.factory.UnsatisfiedDependencyException:Error creating beans 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.UnsatisfiedDependencyException:Error creating beans with Name ' Org.springframework.cloud.config.server.config.CompositeConfiguration ': UnsatisfiedDependency expressed through method ' Setenvironmentrepos ' parameter 0; Nested exception is org.springframework.beans.factory.BeanCreationException:Error creating beans with Name ' Defaultenvironmentrepository ' defined in class path resource [org/springframework/cloud/config/server/config/ Environmentrepositoryconfiguration$defaultrepositoryconfiguration.class]: Invocation of Init method failed; Nested exception is Java.lang.IllegalStateException:You need to configure a URI for the Git repository
Spring Cloud config git-configured pits