Introduce @TestPropertySource support in the TestContext framework [SPR-12051] #16667
Closed
5 tasks done
Labels
Milestone
Sam Brannen opened SPR-12051 and commented
Status Quo
#14865 and #16004 proposed support for using
@PropertySource
on test classes and introducing@TestPropertyValue
for declarativePropertySource
value declarations, respectively. This issue supersedes those two issues by combining the two proposals into a dedicated@TestPropertySource
annotation.Deliverables
@TestPropertySource
annotation for configuring a test-specificPropertySource
.@TestPropertySource
must support attributes analogous to those found in@PropertySource
(i.e., for declaring resource locations).@TestPropertySource
must support an additional attribute that allows for key/value pairs to be declared inline.value
attribute in@IntegrationTest
from Spring Boot for implementation ideas.@ActiveProfiles
,@TestPropertySource
declarations on test classes should be inherited by default but overridable via a boolean flag (i.e., attribute in the annotation).MergedContextConfiguration
) must take test property sources into account.Further Resources
ConfigurationClassParser.processPropertySource(AnnotationAttributes)
Issue Links:
@TestPropertySource
support in the reference manual ("is depended on by")@PropertySource
to be specified on a test class ("supersedes")Referenced from: commits f2ac025, 2cf4147
1 votes, 3 watchers
The text was updated successfully, but these errors were encountered: