Alef Arendsen in this post explains the various ways you can create objects using the Spring ‘s ApplicationContext. He also explains in detail the FactoryBean interface and how it can be used to implement factories that can be embedded in the ApplicationContext XML configuration.