From a2a815e63b0c7b0d8e97943f87a5eea712a9e3e4 Mon Sep 17 00:00:00 2001
From: buildmaster
bootstrap.yml. cloud: config: uri: ${SPRING_CONFIG_URI:http://localhost:8888}
-
If your application needs any application-specific configuration from the server, it is a good idea to set the spring.application.name (in bootstrap.yml or application.yml).
You can disable the bootstrap process completely by setting spring.cloud.bootstrap.enabled=false (for example, in system properties).
If you build an application context from SpringApplication or SpringApplicationBuilder, then the Bootstrap context is added as a parent to that context.
+
If your application needs any application-specific configuration from the server, it is a good idea to set the spring.application.name (in bootstrap.yml or application.yml).
+In order for the property spring.application.name to be used as the application’s context ID you
+must set it in bootstrap.[properties | yml].
You can disable the bootstrap process completely by setting spring.cloud.bootstrap.enabled=false (for example, in system properties).
If you build an application context from SpringApplication or SpringApplicationBuilder, then the Bootstrap context is added as a parent to that context.
It is a feature of Spring that child contexts inherit property sources and profiles from their parent, so the “main” application context contains additional property sources, compared to building the same context without Spring Cloud Config.
The additional property sources are:
PropertySourceLocators are found in the Bootstrap context and if they have non-empty properties, an optional CompositePropertySource appears with high priority.
An example would be properties from the Spring Cloud Config Server.
diff --git a/2.1.x/single/spring-cloud-commons.html b/2.1.x/single/spring-cloud-commons.html
index da252c9c..ad6f9476 100644
--- a/2.1.x/single/spring-cloud-commons.html
+++ b/2.1.x/single/spring-cloud-commons.html
@@ -21,7 +21,9 @@ The following listing shows an example:bootstrap.yml. cloud: config: uri: ${SPRING_CONFIG_URI:http://localhost:8888}
-
If your application needs any application-specific configuration from the server, it is a good idea to set the spring.application.name (in bootstrap.yml or application.yml).
You can disable the bootstrap process completely by setting spring.cloud.bootstrap.enabled=false (for example, in system properties).
If you build an application context from SpringApplication or SpringApplicationBuilder, then the Bootstrap context is added as a parent to that context.
+
If your application needs any application-specific configuration from the server, it is a good idea to set the spring.application.name (in bootstrap.yml or application.yml).
+In order for the property spring.application.name to be used as the application’s context ID you
+must set it in bootstrap.[properties | yml].
You can disable the bootstrap process completely by setting spring.cloud.bootstrap.enabled=false (for example, in system properties).
If you build an application context from SpringApplication or SpringApplicationBuilder, then the Bootstrap context is added as a parent to that context.
It is a feature of Spring that child contexts inherit property sources and profiles from their parent, so the “main” application context contains additional property sources, compared to building the same context without Spring Cloud Config.
The additional property sources are:
PropertySourceLocators are found in the Bootstrap context and if they have non-empty properties, an optional CompositePropertySource appears with high priority.
An example would be properties from the Spring Cloud Config Server.
diff --git a/2.1.x/spring-cloud-commons.xml b/2.1.x/spring-cloud-commons.xml
index bdc24cb8..3ae179c5 100644
--- a/2.1.x/spring-cloud-commons.xml
+++ b/2.1.x/spring-cloud-commons.xml
@@ -59,7 +59,9 @@ The following listing shows an example:
uri: ${SPRING_CONFIG_URI:http://localhost:8888}
-