構成との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"/>
...
これで、demo
Bean は と の両方xml
を使用して定義されannotations
ます。初期化中、誰がbean
:annotation
またはxml
.