Allow customer resolver and property sources

Add factory methods to `AbstractEnvironment` that allow a custom
`ConfigurablePropertyResolver` and `MutablePropertySources` instance
to be used.

See gh-26462
This commit is contained in:
Phillip Webb
2021-01-27 17:06:00 -08:00
committed by Stephane Nicoll
parent 3524401bf1
commit d4c609f2f0
4 changed files with 95 additions and 4 deletions

View File

@@ -54,6 +54,14 @@ public class StandardServletEnvironment extends StandardEnvironment implements C
public static final String JNDI_PROPERTY_SOURCE_NAME = "jndiProperties";
public StandardServletEnvironment() {
}
protected StandardServletEnvironment(MutablePropertySources propertySources) {
super(propertySources);
}
/**
* Customize the set of property sources with those contributed by superclasses as
* well as those appropriate for standard servlet-based environments: