This week's book giveaway is in the OO, Patterns, UML and Refactoring forum. We're giving away four copies of Refactoring for Software Design Smells: Managing Technical Debt and have Girish Suryanarayana, Ganesh Samarthyam & Tushar Sharma on-line! See this thread for details.
You can do this with Spring, since it's designed to interface and you can select the implementation based on logic. You can do it in multiple ways - so not sure what your stuck at or how you are trying to use Spring.
Usually you might want to encapsulate object creation in a factory Factory method pattern.
Again without looking at the specific context it's not easy to make a general statement on whether something is a good or bad idea!