title: Spring Boot - How to exclude one component during scan?
body: <p>I have a JAR dependency that I am required to use. There is one component in that JAR that is interfering with a part of my Spring Boot application. I need to exclude that ONE component, and changing the component definition in the JAR dependency is not currently possible.</p>
  
  <p>I have tried the following, but it does not work, the bean is still loaded:</p>
  
  <pre><code>@SpringBootApplication
  @ComponentScan(useDefaultFilters = false, excludeFilters = [Filter(type = FilterType.ASSIGNABLE_TYPE, classes = [SomeBean::class])])
  </code></pre>
  
  <p>The bean is defined as:</p>
  
  <pre><code>@RestController
  class SomeBean {
  </code></pre>
  
  <p>NOTE: These snippets are in Kotlin.</p>