title: Which have more priority: Spring annotation or xml configuration
body: <p>If i have a <code>spring bean</code> defined using both <code>xml</code> configuration and <code>annotation</code>. Then while initialization, which have more priority, <code>xml</code> or <code>annotations</code>.</p>
  
  <p>Like my bean is...</p>
  
  <pre><code>package com.abc;    
  
  @Component
  Class Demo{
      ...
  }
  </code></pre>
  
  <p>And my <code>xml</code> configuration is...</p>
  
  <pre><code>...
  &lt;context:annotation-config /&gt;
  &lt;context:component-scan base-package="com.abc" /&gt;
  
  &lt;bean id="demo" class="com.abc.Demo"/&gt;
  ...
  </code></pre>
  
  <p>Now the <code>demo</code> bean is defined using both <code>xml</code> and <code>annotations</code>. While initialization, who is initializing <code>bean</code>: <code>annotation</code> or <code>xml</code>.</p>