title: How do I override a Spring bean definition yet still reference the overridden bean?
body: <p>I'm attempting to implement a delegate Service provider by overriding the bean definition for the original service with my delegate Service.  However, as the name would imply, the delegate Service needs a reference to the original service to delegate calls to.</p>
  
  <p>I'm having trouble figuring out how to override the bean definition while using the original bean def without running into a circular reference issue.</p>
  
  <p>For example:</p>
  
  <pre><code>&lt;!-- Original service def in spring-context.xml --&gt;
  &lt;bean id="service" class="com.mycompany.Service"/&gt;
  
  &lt;!-- Overridden definition in spring-plugin-context.xml --&gt;
  &lt;bean id="service" class="com.mycompany.DelegatedService"/&gt;
      &lt;constructor-arg ref="service"/&gt;
  &lt;/bean&gt;
  </code></pre>
  
  <p>Is this possible?</p>