Understanding Spring @Configuration classes as BeanDefinitions generators
<p>Classes annotated with <code>@Configuration</code> are equivalente to define beans using traditional Spring XMLs with <code>&lt;bean&gt;</code> elements. </p>

<p>If I understand well, every <code>@Bean</code> defined generates a <code>BeanDefinition</code> that Spring will use to generate a bean, doesn't it?</p>

<p>Now suppose that I autowired the ApplicationContext and access one of its beans:</p>

<pre><code>@Configuration
public class SomeConfig{

    @Autowired
    private ApplicationContext ac;

    @Bean
    public MyBean myBean(){
        AnotherBean ab = (AnotherBean) ac.getBean("someBean");
        MyBean mb = new MyBean(ab);
        return mb;
    }
}
</code></pre>

<p>Am I really accessing a bean or a <code>BeanDefinition</code>? This has implications, I don't want the container to start creating all the beans during the BeanDefinition stage.</p>

<p>If instead I <code>@Autowire</code> a bean, am I actually autowiring a bean or a BeanDefinition?</p>

<pre><code>@Configuration
public class SomeConfig{

    @Autowired
    private AnotherBean ab;

    @Bean
    public MyBean myBean(){
        MyBean mb = new MyBean(ab);
        return mb;
    }
}
</code></pre>