NOTE
Spring Bean Scopes
Singleton, prototype, request/session and other Spring bean scopes, including lifecycle and thread-safety implications.
This is a historical learning note and may contain outdated or incomplete understanding.
Common Spring scopes include singleton (one instance per container/bean definition context), prototype (new instance per lookup/injection resolution), and web-aware request/session/application scopes.
Spring singleton does not mean a JVM-global singleton. It also does not make the bean thread-safe: singleton service beans commonly serve concurrent requests, so mutable shared fields require correct synchronization or, preferably, stateless design.
Prototype destruction is not managed like singleton destruction after the instance leaves the container; resource ownership still needs an explicit lifecycle.