Bean Scopes

The default scope of spring beans is Singleton. We can change it using @Scope annotation. There are other types of scopes:

  • singleton
  • prototype
  • request
  • session
  • application
  • websocket

The last four scopes mentioned, request, session, application and websocket, are only available in a web-aware application.