Browse Source

Make addPropertySourcesToEnvironment() public

This commit makes the recently introduced
addPropertySourcesToEnvironment(ConfigurableEnvironment, ResourceLoader,
List<PropertySourceDescriptor>) method in TestPropertySourceUtils public
so that it can be used by third parties (for example, Spring Boot).

Closes gh-30981
pull/31012/head
Sam Brannen 2 years ago
parent
commit
837e8960c2
  1. 5
      spring-test/src/main/java/org/springframework/test/context/support/TestPropertySourceUtils.java

5
spring-test/src/main/java/org/springframework/test/context/support/TestPropertySourceUtils.java

@ -245,8 +245,10 @@ public abstract class TestPropertySourceUtils { @@ -245,8 +245,10 @@ public abstract class TestPropertySourceUtils {
* descriptors and registering property sources
* @since 6.1
* @see TestPropertySource#locations
* @see TestPropertySource#encoding
* @see TestPropertySource#factory
* @see PropertySourceFactory
* @see #addPropertySourcesToEnvironment(ConfigurableEnvironment, ResourceLoader, List)
*/
public static void addPropertySourcesToEnvironment(ConfigurableApplicationContext context,
List<PropertySourceDescriptor> descriptors) {
@ -276,10 +278,11 @@ public abstract class TestPropertySourceUtils { @@ -276,10 +278,11 @@ public abstract class TestPropertySourceUtils {
* descriptors and registering property sources
* @since 6.1
* @see TestPropertySource#locations
* @see TestPropertySource#encoding
* @see TestPropertySource#factory
* @see PropertySourceFactory
*/
private static void addPropertySourcesToEnvironment(ConfigurableEnvironment environment,
public static void addPropertySourcesToEnvironment(ConfigurableEnvironment environment,
ResourceLoader resourceLoader, List<PropertySourceDescriptor> descriptors) {
Assert.notNull(environment, "'environment' must not be null");

Loading…
Cancel
Save