abstract class TestPropertySourceUtils
Utility methods for working with TestPropertySource and adding test PropertySource to the Environment.
Primarily intended for use within the framework.
Author
Sam Brannen
Since
4.1
See Also
TestPropertySource
TestPropertySourceUtils()
Utility methods for working with TestPropertySource and adding test PropertySource to the Primarily intended for use within the framework. |
static val INLINED_PROPERTIES_PROPERTY_SOURCE_NAME: String
The name of the MapPropertySource created from inlined properties. |
open static fun addInlinedPropertiesToEnvironment(context: ConfigurableApplicationContext, vararg inlinedProperties: String): Unit
Add the given inlined properties to the Environment of the supplied This method simply delegates to open static fun addInlinedPropertiesToEnvironment(environment: ConfigurableEnvironment, vararg inlinedProperties: String): Unit
Add the given inlined properties (in the form of key-value pairs) to the supplied ConfigurableEnvironment. All key-value pairs will be added to the For details on the parsing of inlined properties, consult the Javadoc for |
|
open static fun addPropertiesFilesToEnvironment(context: ConfigurableApplicationContext, vararg locations: String): Unit
Add the Properties files from the given resource This method simply delegates to open static fun addPropertiesFilesToEnvironment(environment: ConfigurableEnvironment, resourceLoader: ResourceLoader, vararg locations: String): Unit
Add the Properties files from the given resource Property placeholders in resource locations (i.e., Each properties file will be converted to a ResourcePropertySource that will be added to the PropertySources of the environment with highest precedence. |
|
open static fun convertInlinedPropertiesToMap(vararg inlinedProperties: String): MutableMap<String, Any>
Convert the supplied inlined properties (in the form of key-value pairs) into a map keyed by property name, preserving the ordering of property names in the returned map. Parsing of the key-value pairs is achieved by converting all pairs into virtual properties files in memory and delegating to For a full discussion of inlined properties, consult the Javadoc for |