Spring 5.0 Cookbook
上QQ阅读APP看书,第一时间看更新

Creating Singleton and Prototype beans

Creating beans to the containers is not enough for any project specification using the Spring framework. It is always necessary to determine the lifespan of the beans through bean scopes. The following recipe will determine how to optimize a container by creating Singleton and Prototypes beans.