diff --git a/2.1.x/multi/multi__spring_cloud_context_application_context_services.html b/2.1.x/multi/multi__spring_cloud_context_application_context_services.html index 9cdd05b3..ca848605 100644 --- a/2.1.x/multi/multi__spring_cloud_context_application_context_services.html +++ b/2.1.x/multi/multi__spring_cloud_context_application_context_services.html @@ -17,7 +17,7 @@ The following listing shows an example:

bootstrap.yml.  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). 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).

1.2 Application Context Hierarchies

If you build an application context from SpringApplication or SpringApplicationBuilder, then the Bootstrap context is added as a parent to that context. +must set it in bootstrap.[properties | yml].

If you want to retrieve specific profile configuration, you should also set spring.profiles.active in bootstrap.[properties | yml].

You can disable the bootstrap process completely by setting spring.cloud.bootstrap.enabled=false (for example, in system properties).

1.2 Application Context Hierarchies

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:

1.2 Application Context Hierarchies

If you build an application context from SpringApplication or SpringApplicationBuilder, then the Bootstrap context is added as a parent to that context. +must set it in bootstrap.[properties | yml].

If you want to retrieve specific profile configuration, you should also set spring.profiles.active in bootstrap.[properties | yml].

You can disable the bootstrap process completely by setting spring.cloud.bootstrap.enabled=false (for example, in system properties).

1.2 Application Context Hierarchies

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:

  • bootstrap: If any 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 86632fa2..41e922aa 100644 --- a/2.1.x/spring-cloud-commons.xml +++ b/2.1.x/spring-cloud-commons.xml @@ -62,6 +62,7 @@ The following listing shows an example: 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]. +If you want to retrieve specific profile configuration, you should also set spring.profiles.active in bootstrap.[properties | yml]. You can disable the bootstrap process completely by setting spring.cloud.bootstrap.enabled=false (for example, in system properties).