In my app config I have;
At runtime I want to replace "some.bean" by "some.other.bean".Code:<bean class="test"> <property name="prop" ref="some.bean"/> </bean>
So when "test" is used, it would be using "some.other.bean".
To do this, I'm using InstantiationAwareBeanPostProcessorAdapter and method;
Now, I have some special case here for which I need the original reference value instead of the actual referenced object.Code:public PropertyValues postProcessPropertyValues(PropertyValues propertyValues, PropertyDescriptor[] propertyDescriptors, Object bean, String beanName).
In other words, I want to retrieve "some.bean" as the actual name of the referenced bean.
In the API I can get several things; I can get the property name (which is 'prop') I also can get the object reference to some.bean etc.
But not the original ref. value before it was 'replaced' by the actual bean reference (some.bean)
Is there a way to do this?


Reply With Quote
