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,26 @@
|
||||
# Every callback for one bean, from constructor to the last destroy hook (SpringApplication, no web server)
|
||||
|
||||
=== startup ===
|
||||
constructor
|
||||
setter injection (@Autowired setDependency)
|
||||
BeanNameAware.setBeanName("kitchenSink")
|
||||
BeanFactoryAware.setBeanFactory
|
||||
ApplicationContextAware.setApplicationContext
|
||||
BeanPostProcessor.postProcessBeforeInitialization
|
||||
@PostConstruct
|
||||
InitializingBean.afterPropertiesSet
|
||||
@Bean(initMethod = "customInit")
|
||||
BeanPostProcessor.postProcessAfterInitialization
|
||||
SmartInitializingSingleton.afterSingletonsInstantiated
|
||||
SmartLifecycle.start (phase 2147483647)
|
||||
ContextRefreshedEvent
|
||||
ApplicationStartedEvent
|
||||
ApplicationRunner.run
|
||||
ApplicationReadyEvent
|
||||
|
||||
=== ctx.close() ===
|
||||
ContextClosedEvent
|
||||
SmartLifecycle.stop
|
||||
@PreDestroy
|
||||
DisposableBean.destroy
|
||||
@Bean(destroyMethod = "customDestroy")
|
||||
Reference in New Issue
Block a user