View RSS Feed

Spring Framework

SpringSource Spring Framework tutorials and examples. Focusing on Spring 3 and above.

  1. Understanding the Difference Between Singleton vs. Prototyping of Spring Beans

    by , 11-16-2011 at 05:13 PM
    When you configure a new Spring beanBy default, all Spring beans are singletons. When the container dispenses a bean, it will always give the exact same instance of the bean. But sometimes you want the application context to return a unique instance for each time you request a specific bean. In this case, you would want to do is to define a prototype bean. When you define a prototype means that you define a blueprint of the bean. Every subsequent bean for this requested bean will be based on this ...