I am using @TestPropertySource to overwrite application.yml properties in my integration test for a spring boot app.
@TestPropertySource(properties = { \"rep
@TestPropertySource only provides declarative mechanisms for configuring PropertySources. Documentation in Spring Reference Manual.
If you need programmatic support for adding a PropertySource to the Environment, you should implement an ApplicationContextInitializer which can be registered via @ContextConfiguration(initializers = ...). Documentation in Spring Reference Manual.
Regards,
Sam (author of the Spring TestContext Framework)