I want to know how to inject attribute of an Object to another Spring bean in Spring XML configurations? I have declared a bean in configuration file and I want to inject attribute of that bean into another bean.
Update: Here is the configurations I tried in the spring.xml file.
<bean id="cFactoryBean" class="org.springframework.data.cassandra.config.CassandraClusterFactoryBean>
<property name="contactPoints" value="${cassandra.contactpoints}" />
<property name="port" value="${cassandra.port}" />
</bean>
<bean id="sFactoryBean" class="org.springframework.data.cassandra.config.CassandraSessionFactoryBean>
<property name="cluster" value="${cFactoryBean.object}" />
<property name="keyspaceName" value="${cassandra.keyspace}" />
<property name="converter" ref="cConverterBean" />
</bean>
I have created cFactoryBean bean and I want to inject object property of cFactoryBean to the 'cluster' property in the sFactoryBean.
objectproperty incFactoryBean- Jens