zoukankan      html  css  js  c++  java
  • SpringBoot 启动挂载点说明 对应Spring应用事件监听

    SpringBoot应用启动过程挂载点与Spring事件监听对应如下表:

    starting				ApplicationStartingEvent
    environmentPrepared     ApplicationEnvironmentPreparedEvent
    contextPrepared         ApplicationContextInitializedEvent
    contextLoaded           ApplicationPreparedEvent
    started                 ApplicationStartedEvent
    running					ApplicationReadyEvent
    failed					ApplicationFailedEvent
    

      

    Spring中注册监听事件:

    @Component
    public class AppListener implements ApplicationListener<ApplicationReadyEvent> {
        @Override
        public void onApplicationEvent(ApplicationReadyEvent event) {
            System.out.println("SPRING BOOT READY!!!");
        }
    }
    

      

  • 相关阅读:
    StringBuffer
    Mysql语法大全
    String类
    装箱拆箱
    修饰符
    杨辉三角
    基本变量类型
    随手快递app开发第五天
    随手快递app开发第四天
    随手快递app开发第三天
  • 原文地址:https://www.cnblogs.com/hfultrastrong/p/12212780.html
Copyright © 2011-2022 走看看