title: How to include my class into Spring context?
body: <p>We're running a Spring setup where I don't see any XML config files, seems everything is done via annotation.</p>
  
  <p>I've got some custom component classes in a specific package I need added to the spring context for autowiring and I annotated the class with @Component but it's not making a difference. Am I missing another annotation?</p>
  
  <p>There is one loop I have where I needed to do a component scan to discover all the classes in the package, maybe I can just add them there since I'd already have a BeanDefinition handle on them. If so, what would I have to do?</p>
  
  <pre><code>for (BeanDefinition bd : scanner.findCandidateComponents("com.blah.target")) {
    // how to add it to context here?
  }
  </code></pre>