如果我spring bean使用xml配置和annotation. 然后在初始化时,优先级更高,xml或者annotations.
就像我的豆子...
package com.abc;
@Component
Class Demo{
...
}
而我的xml配置是...
...
<context:annotation-config />
<context:component-scan base-package="com.abc" />
<bean id="demo" class="com.abc.Demo"/>
...
现在demobean 是使用xml和定义的annotations。初始化时,谁在初始化bean:annotation或xml.