Add core-beans: bean scopes, the prototype-in-singleton trap, lifecycle callback order and graceful shutdown phases on Boot 4.1
Co-Authored-By: Claude Sonnet 5 <[email protected]> Claude-Session: https://claude.ai/code/session_01JoVmf2fWvcpoXndcDSwRf7
This commit is contained in:
@@ -0,0 +1,14 @@
|
||||
# How many instances did the container really construct?
|
||||
|
||||
right after refresh():
|
||||
singleton instances : 1
|
||||
@Lazy singleton : 0
|
||||
prototype : 0
|
||||
|
||||
after getBean() twice for singleton and lazy, three times for prototype:
|
||||
singleton instances : 1 same object both times: true
|
||||
@Lazy singleton : 1 same object both times: true
|
||||
prototype : 3 serials: 1, 2, 3
|
||||
|
||||
two separate contexts, each with SingletonBean:
|
||||
singleton instances : 2 same object across contexts: false
|
||||
Reference in New Issue
Block a user