I would like to use spring in place of Factory pattern and would require some help or code samples for that.
a brief background what I am trying to achieve
Based on the account type I want to create a validator class which performs validation over it.
if account type is TA
then create an instance of TradingAccountValidator
if accoun type is BA
then some other instance...