What is Scope and What are Spring and Boot Scopes? What is default scope in Spring
@Scope indicates when obejct should be created in container and how many times.
- singleton (default scope): Object creted once while starting app
- prototype : on every access create new object in container [in multi-threaded env, shared data]
- request (web only) : When request came then create object and destroy once response given.
- session (webonly) : When login success(Http Session created) then object is created, maintained until logout.
- context (not exist now)