Spring Framework new release 4.3 make some Web Improvements. Among that, it simplifies way to implement Bean Scopes (Request, Session and Application scopes) using Annotation: @RequestScope | @SessionScope | @ApplicationScope. They are only valid in the context of a web-aware Application.
The tutorial shows you the way to implement Bean Scopes (Singleton, Prototype, Request and Session) using Annotation @Scope. Except Singleton and Prototype Scope, the others are only valid in the context of a web-aware Application.
Related Article: Spring Bean Scope – Singleton and Prototype
Spring Bean Scopes helps you control the scope of the objects which are created from bean definition. This approach is wonderful because you can choose the scope by configuring bean instead of working at Java class level.
The Spring Framework supports 7 scopes, but this tutorial introduces you 2 of them: singleton scope and prototype scope. The others will be discussed in next article.