If you are using the git profile, you need to set a Git URI in your configuration. If you are using a native profile and have spring.cloud.config.server.bootstrap=true, you need to use a composite configuration.
See original GitHub issueI am trying to use S3 as backend for config server. Below is my bootstarp.yml looks like
spring:
profiles:
active: awss3
cloud:
config:
profile: test
label: sample-config
server:
awss3:
region: us-east-1
bucket: srikanth-sg-demo-config-server
bootstrap: true
Here is the stack trace when I run my spring boot application
2020-06-02 14:47:44.050 INFO 15056 --- [ main] trationDelegate$BeanPostProcessorChecker : Bean 'org.springframework.cloud.autoconfigure.ConfigurationPropertiesRebinderAutoConfiguration' of type [org.springframework.cloud.autoconfigure.ConfigurationPropertiesRebinderAutoConfiguration] is not eligible for getting processed by all BeanPostProcessors (for example: not eligible for auto-proxying)
. ____ _ __ _ _
/\\ / ___'_ __ _ _(_)_ __ __ _ \ \ \ \
( ( )\___ | '_ | '_| | '_ \/ _` | \ \ \ \
\\/ ___)| |_)| | | | | || (_| | ) ) ) )
' |____| .__|_| |_|_| |_\__, | / / / /
=========|_|==============|___/=/_/_/_/
:: Spring Boot :: (v2.3.0.RELEASE)
2020-06-02 14:47:46.054 INFO 15056 --- [ main] b.c.PropertySourceBootstrapConfiguration : Located property source: CompositePropertySource {name='configService', propertySources=[MapPropertySource {name='application'}]}
2020-06-02 14:47:46.059 INFO 15056 --- [ main] c.s.java.ConfigserverdemoApplication : The following profiles are active: awss3
2020-06-02 14:47:47.035 INFO 15056 --- [ main] o.s.cloud.context.scope.GenericScope : BeanFactory id=7dab5c52-d735-3ddb-a753-639686d963c9
2020-06-02 14:47:47.131 INFO 15056 --- [ main] trationDelegate$BeanPostProcessorChecker : Bean 'org.springframework.cloud.autoconfigure.ConfigurationPropertiesRebinderAutoConfiguration' of type [org.springframework.cloud.autoconfigure.ConfigurationPropertiesRebinderAutoConfiguration] is not eligible for getting processed by all BeanPostProcessors (for example: not eligible for auto-proxying)
2020-06-02 14:47:47.401 INFO 15056 --- [ main] o.s.b.w.embedded.tomcat.TomcatWebServer : Tomcat initialized with port(s): 7788 (http)
2020-06-02 14:47:47.418 INFO 15056 --- [ main] o.apache.catalina.core.StandardService : Starting service [Tomcat]
2020-06-02 14:47:47.418 INFO 15056 --- [ main] org.apache.catalina.core.StandardEngine : Starting Servlet engine: [Apache Tomcat/9.0.35]
2020-06-02 14:47:47.541 INFO 15056 --- [ main] o.a.c.c.C.[Tomcat].[localhost].[/] : Initializing Spring embedded WebApplicationContext
2020-06-02 14:47:47.541 INFO 15056 --- [ main] o.s.web.context.ContextLoader : Root WebApplicationContext: initialization completed in 1466 ms
2020-06-02 14:47:47.901 INFO 15056 --- [ main] o.s.s.concurrent.ThreadPoolTaskExecutor : Initializing ExecutorService 'applicationTaskExecutor'
2020-06-02 14:47:48.181 WARN 15056 --- [ main] ConfigServletWebServerApplicationContext : Exception encountered during context initialization - cancelling refresh attempt: org.springframework.beans.factory.UnsatisfiedDependencyException: Error creating bean with name 'healthIndicatorRegistry' defined in class path resource [org/springframework/boot/actuate/autoconfigure/health/LegacyHealthEndpointCompatibilityConfiguration.class]: Unsatisfied dependency expressed through method 'healthIndicatorRegistry' parameter 0; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'healthContributorRegistry' defined in class path resource [org/springframework/boot/actuate/autoconfigure/health/HealthEndpointConfiguration.class]: Bean instantiation via factory method failed; nested exception is org.springframework.beans.BeanInstantiationException: Failed to instantiate [org.springframework.boot.actuate.health.HealthContributorRegistry]: Factory method 'healthContributorRegistry' 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.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.IllegalStateException: You need to configure a uri for the git repository.
2020-06-02 14:47:48.182 INFO 15056 --- [ main] o.s.s.concurrent.ThreadPoolTaskExecutor : Shutting down ExecutorService 'applicationTaskExecutor'
2020-06-02 14:47:48.185 INFO 15056 --- [ main] o.apache.catalina.core.StandardService : Stopping service [Tomcat]
2020-06-02 14:47:48.207 INFO 15056 --- [ main] ConditionEvaluationReportLoggingListener :
Error starting ApplicationContext. To display the conditions report re-run your application with 'debug' enabled.
2020-06-02 14:47:48.210 ERROR 15056 --- [ main] o.s.b.d.LoggingFailureAnalysisReporter :
***************************
APPLICATION FAILED TO START
***************************
Description:
Invalid config server configuration.
Action:
If you are using the git profile, you need to set a Git URI in your configuration. If you are using a native profile and have spring.cloud.config.server.bootstrap=true, you need to use a composite configuration.
Issue Analytics
- State:
- Created 3 years ago
- Reactions:1
- Comments:31 (8 by maintainers)
Top Results From Across the Web
Spring Cloud git configuration -- placing repository in folder ...
Action: If you are using the git profile, you need to set a Git URI in your configuration. If you are using a...
Read more >2. Spring Cloud Config Server
Spring Cloud Config Server provides an HTTP resource-based API for external configuration (name-value pairs or equivalent YAML content).
Read more >Spring Cloud discussion and questions - Gitter
Action: If you are using the git profile, you need to set a Git URI in your configuration. If you are using a...
Read more >Spring Cloud Config Server with Git Integration
spring.cloud.config.server.git.uri will bind the git location to look for the configuration. Here we are using local git repo but can ...
Read more >Quick Intro to Spring Cloud Configuration - Baeldung
Now we need to configure the server port on which our server is listening and a Git-url, which provides our version-controlled configuration content....
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
It will works if rename file bootstrap.yml -> application.yml.
Updated. It works by renaming
bootstrap.ymlfile intoapplication.ymlfile again like in this link --> https://stackoverflow.com/questions/65829117/spring-cloud-configuration-server-not-working-with-local-properties-file-getti