how do I dynamically change the properties of a bean at runtime using java spring? I have a bean mainView, which should use as property \"class\" either \"class1\" or \"clas
Use a PropertyPlaceHolder to manage your properties file ..
The service properties file
and change your ref attribute as follow :
In your properties file some.where.MyApp.properties, add a key named withSmartCardClassImplementation which will have class1 or class2 (you choose) for value.
withSmartCardClassImplementation=class1