On my spring boot application I want to override just one of my @Configuration classes with a test configuration (in particular my @EnableAuthorizationServer @Configuration class), on all of my tests.
So far after an overview of spring boot testing features and spring integration testing features no straightforward solution has surfaced:
@TestConfiguration: It's for extending, not overriding;@ContextConfiguration(classes=…)and@SpringApplicationConfiguration(classes =…)let me override the whole config, not just the one class;- An inner
@Configurationclass inside a@Testis suggested to override the default configuration, but no example is provided;
Any suggestions?