java spring を使用して実行時に Bean のプロパティを動的に変更するにはどうすればよいですか? プロパティ「class」として「class1」または「class2」を使用する必要があるBean mainViewがあります。この決定は、「withSmartcard」プロパティが「Y」または「N」であるプロパティ ファイルに基づいて行う必要があります。
アプリケーションコンテキスト:
<bean id="mainView"
class="mainView">
<property name="angebotsClient" ref="angebotsClient" />
<property name="class" ref="class1" />
</bean>
<bean id="class1"
class="class1">
<constructor-arg ref="mainView" />
</bean>
<bean id="class2"
class="class2">
<constructor-arg ref="mainView" />
</bean>
プロパティファイル:
withSmartcard=Y