SpringApplicationRunListener笔记
SpringApplicationRunListener:springboot中定义的应用上下文监听器。
/**
* 当run方法首次启动时立即调用。可用于非常早期初始化。
*/
void started();
/**
* ApplicationEnvironmentPreparedEvent事件类,当环境准备好回调
*/
void environmentPrepared(ConfigurableEnvironment environment);
/**
* 在context中注册广播器bean
*/
void contextPrepared(ConfigurableApplicationContext context);
/**
* ApplicationPreparedEvent事件
*/
void contextLoaded(ConfigurableApplicationContext context);
/**
* ApplicationFailedEvent()和ApplicationReadyEvent()事件
*/
void finished(ConfigurableApplicationContext context, Throwable exception);