title: Switch between two beans in spring
body: <p>I have two beans which comes from the same class(id1 and id2), the difference is ids and some properties. 
  In the code, I called getbean(id1) to get the object.  </p>
  
  <p>How can I switch to id2 without recompiling the code?</p>