title: Bean inheritance via annotation
body: <p>How I can provide bean inheritance in Spring using annotations? In XML config I used <code>&lt;parent="parentBean"&gt;</code> tag. Is there some annotation?</p>
  
  <p>For example, I have two beans(cacheEventLogger extends fileEventLogger):</p>
  
  <pre><code> &lt;bean id="fileEventLogger" class="com.myuspring.core.loggers.FileEventLogger" init-method="init"&gt;
      &lt;constructor-arg value="d:/1.txt"/&gt;
  &lt;/bean&gt;
  
  
  &lt;bean id="cacheEventLogger" class="com.myspring.core.loggers.CacheFileEventLogger" init-method="init"
        parent="fileEventLogger" &gt;
      &lt;constructor-arg value="15"/&gt;
      &lt;property name="cacheSize" value="2"/&gt;
  </code></pre>
  
  <p>I've create AppConfig class:</p>
  
  <pre><code>@Configuration
  </code></pre>
  
  <p>public class AppConfig {</p>
  
  <pre><code>@Bean(initMethod = "init")
  public FileEventLogger fileEventLogger() {
      return new FileEventLogger("d:/1.txt");
  }
  
  @Bean(initMethod = "init")
  public CacheFileEventLogger cacheFileEventLogger() {
     ???
  
  }
  </code></pre>
  
  <p>}</p>
  
  <p>What annotation should I set to cacheEventLogger for extending fileEventLogger?</p>