Implement a simple factory pattern with Spring 3 annotations
The following worked for me: The interface consist of you logic methods plus additional identity method: public interface MyService { String getType(); void checkStatus(); } Some implementations: @Component public class MyServiceOne implements MyService { @Override public String getType() { return “one”; } @Override public void checkStatus() { // Your code } } @Component public class … Read more