title: How do I autowire an object from code I depend on?
body: <p>I have a class as such.</p>
  
  <pre><code>public class Foo {
  
    @Autowired
    private Bar bar;
  
  }
  </code></pre>
  
  <p>The class Bar lives in a jar that comes from a dependency pulled in from Maven. How can I add that class to the Spring context so that it will be properly autowired? I can't add the @Component to the source code. Is there a way to do it without XML? I'm currently trying to stick with annotation driven injection as much as possible.</p>
  
  <p>I'm using Spring 3.1.4-RELEASE</p>