title: Spring @Configuration annotation with interfaces like @AutoConfigure
body: <p>I have a project with multiple Integration Tests configured like this:</p>
  <pre><code>@ActiveProfiles(&quot;integration&quot;)
  @SpringBootTest(webEnvironment = SpringBootTest.WebEnvironment.RANDOM_PORT)
  class ControllerConfigIT extends AbstractWireMockTest {...}
  </code></pre>
  <p>I want to enable metrics for <strong>ALL</strong> Test Classes with annotation <code>@AutoConfigureMetrics</code>.</p>
  <p>When I add the annotation to a single test it works fine:</p>
  <pre><code>@ActiveProfiles(&quot;integration&quot;)
  @AutoConfigureMetrics
  @SpringBootTest(webEnvironment = SpringBootTest.WebEnvironment.RANDOM_PORT)
  class ControllerConfigIT extends AbstractWireMockTest {...}
  </code></pre>
  <p>However, I want to use this annotation globally for all tests. I tried to create a configuration:</p>
  <pre><code>@Configuration
  @Profile(&quot;integration&quot;)
  @AutoConfigureMetrics
  public class ITActuatorConfig {}
  </code></pre>
  <p>But it doesn't work.</p>
  <p>One of the working solutions is to create parent class with <code>@AutoConfigureMetrics</code> annotation. However, in most test classes I already extend <code>AbstractWireMockTest</code> class, so this option is not the best one for me.</p>