title: Spring app switching to datasource for testing
body: <p>I haven't found an effective way to do this. I have a spring app that is providing a webservice. This app calls another webservice to get some data. For junit testing purposes I don't want to call the webservice upstream ... instead I want to use an h2 in memory data source. How can I wire my Doa to use the webservice for production but then use the h2 datasource for testing?</p>
  
  <p>I've looked at setting profiles in my context file. This is good for switching to different db datasources but I can't figure out how to define a webservice as a datasource if possible.</p>