Register runtime hints for @TestPropertySource#locations
This commit introduces automatic registration of runtime hints for classpath resources configured via the `locations` attribute in @TestPropertySource as well as for detected default properties files. Closes gh-29025
This commit is contained in:
@@ -171,6 +171,10 @@ class TestContextAotGeneratorTests extends AbstractAotTests {
|
||||
// @ContextConfiguration(locations=...)
|
||||
assertThat(resource().forResource("/org/springframework/test/context/aot/samples/xml/test-config.xml"))
|
||||
.accepts(runtimeHints);
|
||||
|
||||
// @TestPropertySource(locations = ... )
|
||||
assertThat(resource().forResource("/org/springframework/test/context/aot/samples/basic/BasicSpringVintageTests.properties"))
|
||||
.accepts(runtimeHints);
|
||||
}
|
||||
|
||||
private static void assertReflectionRegistered(RuntimeHints runtimeHints, String type, MemberCategory memberCategory) {
|
||||
|
||||
@@ -42,7 +42,7 @@ import static org.assertj.core.api.Assertions.assertThat;
|
||||
@RunWith(SpringRunner.class)
|
||||
// Override the default loader configured by the CustomXmlBootstrapper
|
||||
@ContextConfiguration(classes = BasicTestConfiguration.class, loader = AnnotationConfigContextLoader.class)
|
||||
@TestPropertySource(properties = "test.engine = vintage")
|
||||
@TestPropertySource
|
||||
public class BasicSpringVintageTests {
|
||||
|
||||
@Autowired
|
||||
|
||||
Reference in New Issue
Block a user