If you would like Spring to do the heavy-lifting for your Factory class, you can simply inject ApplicationContext into your factory and delegate your create() methods to Spring’s getBean() methods.

public class YourServiceFactory implements ApplicationContextAware {
    private ApplicationContext context;

    public void setApplicationContext(ApplicationContext context) {
        this.context= context;
    }

    public YourService createYourService() {
        return (YourService ) context.getBean(serviceName);
    }
}