Add @DynamicPropertySource support in TestContext framework
This commit introduces a @DynamicPropertySource annotation that can be used on methods in test classes that want to add properties to the Environment with a dynamically supplied value. This new feature can be used in conjunction with Testcontainers and other frameworks that manage resources outside the lifecycle of a test's ApplicationContext. Closes gh-24540 Co-authored-by: Phillip Webb <pwebb@pivotal.io>
This commit is contained in:
@@ -12,4 +12,5 @@ org.springframework.test.context.TestExecutionListener = \
|
||||
# Default ContextCustomizerFactory implementations for the Spring TestContext Framework
|
||||
#
|
||||
org.springframework.test.context.ContextCustomizerFactory = \
|
||||
org.springframework.test.context.web.socket.MockServerContainerContextCustomizerFactory
|
||||
org.springframework.test.context.web.socket.MockServerContainerContextCustomizerFactory,\
|
||||
org.springframework.test.context.support.DynamicPropertiesContextCustomizerFactory
|
||||
|
||||
Reference in New Issue
Block a user