У меня есть XML-определения бинов, подобные этому
<bean id="testingProperties" class="org.springframework.beans.factory.config.PropertyPlaceholderConfigurer">
<property name="location" value="classpath:myTests.properties"/>
</bean>
<bean id="MyBean" class="org.springframework.remoting.httpinvoker.HttpInvokerProxyFactoryBean">
<property name="serviceUrl" value="${config.http.server.url}/testing/"/>
<property name="serviceInterface" value="com....ClassName"/>
<property name="httpInvokerRequestExecutor" ref="requestExecutor"/>
</bean>
<bean id="requestExecutor" class="com.CustomHttpComponentsHttpInvokerRequestExecutor"></bean>
Как я могу поместить туда if оператор , например, я проверяю свойство и зависит от его значения, решая, нужно ли мневвести свойство httpInvokerRequestExecutor нет?
Этот класс CustomHttpComponentsHttpInvokerRequestExecutor является своего рода перехватчиком, если я работаю над https, он добавляет хранилище доверия и т. Д. В контекст и т. Д. И я хочу решить, нужно ли вводить этот класс как свойство MyBean или нет.
Есть ли способ сделать это?