parent
313e754a84
commit
dfc8406917
|
@ -60,9 +60,17 @@ public class StandardEnvironment extends AbstractEnvironment {
|
||||||
public static final String SYSTEM_PROPERTIES_PROPERTY_SOURCE_NAME = "systemProperties";
|
public static final String SYSTEM_PROPERTIES_PROPERTY_SOURCE_NAME = "systemProperties";
|
||||||
|
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Create a new {@code StandardEnvironment} instance.
|
||||||
|
*/
|
||||||
public StandardEnvironment() {
|
public StandardEnvironment() {
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Create a new {@code StandardEnvironment} instance with a specific {@link MutablePropertySources} instance.
|
||||||
|
* @param propertySources property sources to use
|
||||||
|
* @since 5.3.4
|
||||||
|
*/
|
||||||
protected StandardEnvironment(MutablePropertySources propertySources) {
|
protected StandardEnvironment(MutablePropertySources propertySources) {
|
||||||
super(propertySources);
|
super(propertySources);
|
||||||
}
|
}
|
||||||
|
|
|
@ -108,7 +108,7 @@ class CustomEnvironmentTests {
|
||||||
}
|
}
|
||||||
|
|
||||||
@Test
|
@Test
|
||||||
public void withNoProfileProperties() {
|
void withNoProfileProperties() {
|
||||||
ConfigurableEnvironment env = new AbstractEnvironment() {
|
ConfigurableEnvironment env = new AbstractEnvironment() {
|
||||||
@Override
|
@Override
|
||||||
@Nullable
|
@Nullable
|
||||||
|
@ -131,7 +131,7 @@ class CustomEnvironmentTests {
|
||||||
}
|
}
|
||||||
|
|
||||||
@Test
|
@Test
|
||||||
public void withCustomMutablePropertySources() {
|
void withCustomMutablePropertySources() {
|
||||||
class CustomMutablePropertySources extends MutablePropertySources {}
|
class CustomMutablePropertySources extends MutablePropertySources {}
|
||||||
MutablePropertySources propertySources = new CustomMutablePropertySources();
|
MutablePropertySources propertySources = new CustomMutablePropertySources();
|
||||||
ConfigurableEnvironment env = new AbstractEnvironment(propertySources) {};
|
ConfigurableEnvironment env = new AbstractEnvironment(propertySources) {};
|
||||||
|
|
|
@ -54,9 +54,17 @@ public class StandardServletEnvironment extends StandardEnvironment implements C
|
||||||
public static final String JNDI_PROPERTY_SOURCE_NAME = "jndiProperties";
|
public static final String JNDI_PROPERTY_SOURCE_NAME = "jndiProperties";
|
||||||
|
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Create a new {@code StandardServletEnvironment} instance.
|
||||||
|
*/
|
||||||
public StandardServletEnvironment() {
|
public StandardServletEnvironment() {
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Create a new {@code StandardServletEnvironment} instance with a specific {@link MutablePropertySources} instance.
|
||||||
|
* @param propertySources property sources to use
|
||||||
|
* @since 5.3.4
|
||||||
|
*/
|
||||||
protected StandardServletEnvironment(MutablePropertySources propertySources) {
|
protected StandardServletEnvironment(MutablePropertySources propertySources) {
|
||||||
super(propertySources);
|
super(propertySources);
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue