ApplicationStartedEvent在spring-boot包中。
Event published once the application context has been refreshed but before any
* {@link ApplicationRunner application} and {@link CommandLineRunner command line}
* runners have been called.
ContextStartedEvent在spring-context包中。
Event raised when an {@code ApplicationContext} gets started.
我在最新spring-boot中测试时候,并不触发ContextStartedEvent。
我猜测 是不是ContextStartedEvent与ApplicationStartedEvent触发的时机是一致的?不过在spring中没有springboot的ApplicationRunner 和CommandLineRunner 这几步。
希望得到解答,可以畅所欲言