title: Spring inject a bean into another bean
body: <p>I am trying to inject a bean into another bean that uses it. How can I do this?</p>
  
  <pre><code>public class MySpringConfig{
  @Bean
  public MyObject getMyObject() {
    //.....
  
    return MyObjectInstance;
  }
  
  
  
  @Bean
  public SomeObject getSomeObject(MyObject myObject) {
  
    //.....
  
    return SomeObjectInstance;
   }    
  }
  </code></pre>