-1
<bean id="foo" class="com.bla.Foo" />
<bean id="bar" class="com.bla.Bar" />
<bean id="channel" class="com.bla.Channel">
<constructor-arg ref="#{(config.isFooEnabled()) ? foo : bar}"/>
</bean>
我收到以下錯誤:在constructor-arg中引用bean時,是否可以使用Spring EL?
Cannot resolve reference to bean '#{(config.isFooEnabled()) ? foo : bar}'