diff --git a/multi/multi__spring_cloud_context_application_context_services.html b/multi/multi__spring_cloud_context_application_context_services.html index f6755981..99db794c 100644 --- a/multi/multi__spring_cloud_context_application_context_services.html +++ b/multi/multi__spring_cloud_context_application_context_services.html @@ -57,7 +57,8 @@ For instance, you can insert additional properties from a different server or fr }
The Environment that is passed in is the one for the ApplicationContext about to be created — in other words, the one for which we supply additional property sources for.
It already has its normal Spring Boot-provided property sources, so you can use those to locate a property source specific to this Environment (for example, by keying it on spring.application.name, as is done in the default Spring Cloud Config Server property source locator).
If you create a jar with this class in it and then add a META-INF/spring.factories containing the following, the customProperty PropertySource appears in any application that includes that jar on its classpath:
org.springframework.cloud.bootstrap.BootstrapConfiguration=sample.custom.CustomPropertySourceLocator
If you are going to use Spring Boot to configure log settings than you should place this configuration in `bootstrap.[yml | properties] -if you would like it to apply to all events.
The application listens for an EnvironmentChangeEvent and reacts to the change in a couple of standard ways (additional ApplicationListeners can be added as @Beans by the user in the normal way).
+if you would like it to apply to all events.
![]() | Note |
|---|---|
For Spring Cloud to initialize logging configuration properly you cannot use a custom prefix. For example,
+using |
The application listens for an EnvironmentChangeEvent and reacts to the change in a couple of standard ways (additional ApplicationListeners can be added as @Beans by the user in the normal way).
When an EnvironmentChangeEvent is observed, it has a list of key values that have changed, and the application uses those to:
@ConfigurationProperties beans in the contextlogging.level.*Note that the Config Client does not, by default, poll for changes in the Environment.
Generally, we would not recommend that approach for detecting changes (although you could set it up with a
@Scheduled annotation).
diff --git a/single/spring-cloud-commons.html b/single/spring-cloud-commons.html
index 81762d11..c0b22044 100644
--- a/single/spring-cloud-commons.html
+++ b/single/spring-cloud-commons.html
@@ -63,7 +63,8 @@ For instance, you can insert additional properties from a different server or fr
}
The Environment that is passed in is the one for the ApplicationContext about to be created — in other words, the one for which we supply additional property sources for.
It already has its normal Spring Boot-provided property sources, so you can use those to locate a property source specific to this Environment (for example, by keying it on spring.application.name, as is done in the default Spring Cloud Config Server property source locator).
If you create a jar with this class in it and then add a META-INF/spring.factories containing the following, the customProperty PropertySource appears in any application that includes that jar on its classpath:
org.springframework.cloud.bootstrap.BootstrapConfiguration=sample.custom.CustomPropertySourceLocator
If you are going to use Spring Boot to configure log settings than you should place this configuration in `bootstrap.[yml | properties] -if you would like it to apply to all events.
The application listens for an EnvironmentChangeEvent and reacts to the change in a couple of standard ways (additional ApplicationListeners can be added as @Beans by the user in the normal way).
+if you would like it to apply to all events.
![]() | Note |
|---|---|
For Spring Cloud to initialize logging configuration properly you cannot use a custom prefix. For example,
+using |
The application listens for an EnvironmentChangeEvent and reacts to the change in a couple of standard ways (additional ApplicationListeners can be added as @Beans by the user in the normal way).
When an EnvironmentChangeEvent is observed, it has a list of key values that have changed, and the application uses those to:
@ConfigurationProperties beans in the contextlogging.level.*Note that the Config Client does not, by default, poll for changes in the Environment.
Generally, we would not recommend that approach for detecting changes (although you could set it up with a
@Scheduled annotation).
diff --git a/spring-cloud-commons.xml b/spring-cloud-commons.xml
index 1f37321a..b647fd1e 100644
--- a/spring-cloud-commons.xml
+++ b/spring-cloud-commons.xml
@@ -155,6 +155,10 @@ It already has its normal Spring Boot-provided property sources, so you can use