Prior to this change, any `MapPropertySource` created by an `EnvironmentPostProcessor` would be processed by `BootstrapApplicationListener`. If that property source had a conditional property that it created itself, the 2nd run (bootstrap causes EPPs to run twice) would not have the property and that property source would end up in the main `Environment` effectively deleting a property.
This change only deals with `MapPropertySource`s created by boot testing for a specific sub-type.
Fixes gh-476
If we repeatedly call String#replaceAll, we internally repeatedly call the regular expression pattern compilation every time as following:
```java
public String replaceAll(String regex, String replacement) {
return Pattern.compile(regex).matcher(this).replaceAll(replacement);
}
```
The modifications are to keep the compiled pattern.
Therefore, compiling a relatively expensive regular expression pattern does not have to be done every time.
The JpaInvokerConfiguration (nested in RefreshAutoConfiguration can be
removed when and if the issue is resolved in Boot.
Also splits the hibernate test dependencies out into a separate module
so the main context tests run quicker.
Fixes gh-355
An actuator endpoint is designed around a single class flagged with
`@Endpoint`. Such endpoint can have some of its operations refined with
a given tech (for instance via a `EndpointWebExtension` for web specific
concerns).
This design mandates that an endpoint (and its tech specific refinements
are managed centrally to form a unified contract).
As Spring Cloud is extending the standard Spring Boot's `env` endpoint,
this commit introduces a WritableEnvironmentEndpoint with a web
extension.
Closes gh-367
Closes gh-354
The test shows that this fixes a weird initialization ordering
problem that leads otherwise to Spring thinking there is a
dependency cycle (even though there is not). This problem only
surfaces when there is a schema.sql to apply.
Fixes gh-355
There could be consequences for apps that have more complex context
hierarchies, but RestartEndpoint doesn't work well at all for those
apps anyway, so we are probably safe to just make changes in the
endpoint itself.
Fixes gh-333
Allows you to apply @RefreshScope to beans that you do not
control or define. The list is configurable as
spring.cloud.refresh.refreshable and by default has only
HikariDataSource.
Fixes gh-318