Has anyone tried to auto-wire different beans into a Spring-managed bean based on a condition? For e.g. if some condition is met, inject class A, else B? I saw in one of the
I had a case where I needed to inject different beans depending on property: "my.property". In my case this solution was successful:
I needed to add the apostrophes around bean names in order to make it work.