1
JavaIntermediate#puzzle#operators
Singleton (default, one instance per container), prototype (new instance every request), request/session/application (web-aware scopes tied to HTTP lifecycle). Choosing the right scope avoids state leakage between requests.
@Component
@Scope("prototype")
class ShoppingCart {} // new instance created each time it's requested