title: How do you use a bean from an another class in a class?
body: <p>Using xml, I was able to define a common xml file, where i can put common bean which are used for other differect condig file.
  I move my config to psring java config, how to achieve this  with java config?</p>
  
  <p>let's say I have my common class as :</p>
  
  <pre><code>@Configuration
  public class Common {
      @Bean
      public A a(){
          return new A();
      }
  }
  </code></pre>
  
  <p>and I want to use it as</p>
  
  <pre><code>@Configuration
  public class AConfig {
  
      @Bean
      public ABB abb(){
          ABB abb = new ABB();
          //TODO abb.set  ????
          return abb;
      }
  }
  </code></pre>
  
  <p>The TODO part is missing,  I want to use the a() from the common class.
  Is that possible?</p>