spring-framework / org.springframework.test.context.support / TestPropertySourceUtils / addInlinedPropertiesToEnvironment

addInlinedPropertiesToEnvironment

open static fun addInlinedPropertiesToEnvironment(context: ConfigurableApplicationContext, vararg inlinedProperties: String): Unit

Add the given inlined properties to the Environment of the supplied context.

This method simply delegates to #addInlinedPropertiesToEnvironment(ConfigurableEnvironment, String[]).

Parameters

context - the application context whose environment should be updated; never null

inlinedProperties - the inlined properties to add to the environment; potentially empty but never null

Since
4.1.5

See Also
TestPropertySource#properties#addInlinedPropertiesToEnvironment(ConfigurableEnvironment, String[])

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 Environment as a single MapPropertySource with the highest precedence.

For details on the parsing of inlined properties, consult the Javadoc for #convertInlinedPropertiesToMap.

Parameters

environment - the environment to update; never null

inlinedProperties - the inlined properties to add to the environment; potentially empty but never null

Since
4.1.5

See Also
MapPropertySource#INLINED_PROPERTIES_PROPERTY_SOURCE_NAMETestPropertySource#properties#convertInlinedPropertiesToMap