Browse Source

Polishing

pull/31063/head
Sam Brannen 2 years ago
parent
commit
3a38bb48b5
  1. 2
      framework-docs/modules/ROOT/pages/testing/testcontext-framework/ctx-management/caching.adoc
  2. 12
      spring-test/src/main/java/org/springframework/test/context/support/TestPropertySourceUtils.java

2
framework-docs/modules/ROOT/pages/testing/testcontext-framework/ctx-management/caching.adoc

@ -20,7 +20,7 @@ framework uses the following configuration parameters to build the context cache @@ -20,7 +20,7 @@ framework uses the following configuration parameters to build the context cache
* `contextLoader` (from `@ContextConfiguration`)
* `parent` (from `@ContextHierarchy`)
* `activeProfiles` (from `@ActiveProfiles`)
* `propertySourceLocations` (from `@TestPropertySource`)
* `propertySourceDescriptors` (from `@TestPropertySource`)
* `propertySourceProperties` (from `@TestPropertySource`)
* `resourceBasePath` (from `@WebAppConfiguration`)

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

@ -177,7 +177,7 @@ public abstract class TestPropertySourceUtils { @@ -177,7 +177,7 @@ public abstract class TestPropertySourceUtils {
/**
* Add the {@link Properties} files from the given resource {@code locations}
* to the {@link Environment} of the supplied {@code context}.
* <p>This method simply delegates to
* <p>This method delegates to
* {@link #addPropertiesFilesToEnvironment(ConfigurableEnvironment, ResourceLoader, String...)}.
* @param context the application context whose environment should be updated;
* never {@code null}
@ -229,14 +229,8 @@ public abstract class TestPropertySourceUtils { @@ -229,14 +229,8 @@ public abstract class TestPropertySourceUtils {
/**
* Add property sources for the given {@code descriptors} to the
* {@link Environment} of the supplied {@code context}.
* <p>Property placeholders in resource locations (i.e., <code>${...}</code>)
* will be {@linkplain Environment#resolveRequiredPlaceholders(String) resolved}
* against the {@code Environment}.
* <p>Each {@link PropertySource} will be created via the configured
* {@link PropertySourceDescriptor#propertySourceFactory() PropertySourceFactory}
* (or the {@link DefaultPropertySourceFactory} if no factory is configured)
* and added to the {@link PropertySources} of the environment with the highest
* precedence.
* <p>This method delegates to
* {@link #addPropertySourcesToEnvironment(ConfigurableEnvironment, ResourceLoader, List)}.
* @param context the application context whose environment should be updated;
* never {@code null}
* @param descriptors the property source descriptors to process; potentially

Loading…
Cancel
Save