Why not define all of the different instances of A as prototype beans and instead of creating them let Spring do that for you.
Code:
if(...)
aa = applicationtContext.getBean("instanceB");
else if(...)
aa = applicationContext.getBean("instanceC");
else
aa = applicationContext.getBean("instanceD");
That way I guess you have the best of both worlds.
You could even hide this implementation behind a FactoryBean and simply inject that into your service, that way your service stays clean of the logic of deciding which bean to use and you even the possibility to reuse the logic.