LoggingSystemShutdownListener runs immediately after
BootstrapApplicationListener and contains the code which used to be
in that to clean up the logging system (and make it go dark). That
is still a little bit of a hack to work around some limitations in
the static logging libraries (via the Spring Boot Logging System
and LoggingApplicationListener).
If the LoggingApplicationListener is then *not* applied in the
ContextRefresher, then we don't need the LoggingSystemShutdownListener
either. In fact we can narrow down the ContextRefresher to be only
interested in the listeners that affect the Environment (of which
we know of only 2). It means that any listeners that are added that
affect the Environment will not be applied, but there are plenty of
more "official" channels for modifying the Environment
(EnvironmentPostProcessor and PropertySourceLocator), so users can
easily migrate to a better implementation.
Completes the work started in 7f687b1, where the call to
LoggingSystem.beforeInitialization() was ommitted which results
in JUL logging never being available in the application.
Partial fix for #131 (but a /refresh is still broken)
Given the following in one property source
```
mine[0].someValue=Foo
mine[0].someKey={cipher}XXXX
mine[1].someValue=Bar
mine[1].someKey={cipher}XXXX
yours[0].anotherKey=Baz
```
only `mine[*].someKey` were added to "decrypted" property source. Due to house spring boot manages indexed properties, they can not be merged across property source. This change includes all indexed properties in the "decrypted" property source if any one of them is encrypted.
In the above example, `yours[*].*` is included even though unrelated.
fixes gh-466
Anticipating a change in Spring Boot 1.4.1 to support child context
creation without (needless) re-initialization of the logging system,
we need to carefully manage the lifecycle, in particular calling
cleanUp() when we know there are changes in the pipeline.
Fixes gh-125
A couple of tests here make assumptions about the property source
names added using @IntegrationTest. If we are a bit more defensive
and search for a source with a matching name instead of grabbing
one by the precise name, we can have tests that pass in Boot 1.3
and 1.4.
The new info endpoint doesn't need special treatment to pick up
changes in the Environment, so we can just skip installing the
old bean that manipulates it.
Fixes gh-108
When the bootstrap properties are added back into the main Environment
we have to be careful that any source that is already there (such as
one that was added in a Spring Boot EnvironmentPostProcessor) is not
replaced in the wrong order.
Fixes gh-90
Use SystemEnvironmentPropertySource so that env vars can be
encrypted as well as property values (i.e. FOO_BAR will bind to
@Value("foo.bar")).
Fixes gh-89, fixes gh-87