title: @webMvcTest is not excluding and loading beans marked as @Repository
body: <p>I've a <code>@RestController</code>  which has only one dependency in field <code>@Autowire</code>
  that dependency is @component, that component Class definition has some autowired fields which are @service and those services have some @repositories.</p>
  <p>In this whole flow I've kafka, Quartz, Cassandra and DB2
  So when I was creating a Unit test case for my controller, I dont want to setup whole application. so I decided to use @webMvcTest and used @MockBean on  my only one dependency of controller  class.</p>
  <p>But my Test is throwing and exception because its trying to create a Dao bean, which is marked as @repository.</p>
  <pre><code>@ActiveProfiles(&quot;test&quot;)
  @WebMvcTest(controllers = MyControllerTest .class)
  class MyControllerTest {
  
      @MockBean
      MyControllerDependency dependency;
  
      @Autowired
      MockMvc mockMvc;
  
      @Test
      void test_something() throws Exception {
         assert(true);
      }
  }
  </code></pre>
  <p>Here is oversimplified version of code</p>
  <pre><code>@Component
  class MyControllerDependency { 
      @AutoiWired
      MyCustomService service;
  }
  
  @Service
  class MyCustomService{
  
     @Autowired
     MyCustomDao dao;
  }
  
  @Repository
  class MyCustomDao{
      @Autowired
      private JdbcTemplate template;
  }
  </code></pre>
  <p>I'm getting following exception in test.</p>
  <pre><code>Exception
  
  ***************************
  APPLICATION FAILED TO START
  ***************************
  
  Description:
  
  Field template in com.....MyCustomDao`  required a bean of type 'org.springframework.jdbc.core.JdbcTemplate' that could not be found.
  </code></pre>
  <p>Question is, When I'm using <code>@WebMvcTest</code> slice and already mocking the only required dependency <code>MyControllerDependency </code> then why spring test context is trying to load <code>MyCustomDao</code> which is annotated as  <code>@Repository</code>.</p>
  <p>I can do integration testing with <code>SpringbootTest</code> &amp; <code>AutoconfigureMockMVC</code>, but for writing Junit test just for controller, I need to use <code>WebMvcTest</code> slice. which is creating a problem.</p>