Interface SpringApplicationRunListener

    • Method Summary

      All Methods Instance Methods Abstract Methods 
      Modifier and TypeMethodDescription
      voidcontextLoaded​(org.springframework.context.ConfigurableApplicationContext context)
      Called once the application context has been loaded but before it has been refreshed.
      voidcontextPrepared​(org.springframework.context.ConfigurableApplicationContext context)
      Called once the ApplicationContext has been created and prepared, but before sources have been loaded.
      voidenvironmentPrepared​(org.springframework.core.env.ConfigurableEnvironment environment)
      Called once the environment has been prepared, but before the ApplicationContext has been created.
      voidfailed​(org.springframework.context.ConfigurableApplicationContext context, Throwable exception)
      Called when a failure occurs when running the application.
      voidrunning​(org.springframework.context.ConfigurableApplicationContext context)
      Called immediately before the run method finishes, when the application context has been refreshed and all CommandLineRunners and ApplicationRunners have been called.
      voidstarted​(org.springframework.context.ConfigurableApplicationContext context)
      The context has been refreshed and the application has started but CommandLineRunners and ApplicationRunners have not been called.
      voidstarting()
      Called immediately when the run method has first started.
    • Method Detail

      • starting

        void starting()
        Called immediately when the run method has first started. Can be used for very early initialization.
      • environmentPrepared

        void environmentPrepared​(org.springframework.core.env.ConfigurableEnvironment environment)
        Called once the environment has been prepared, but before the ApplicationContext has been created.
        Parameters:
        environment - the environment
      • contextPrepared

        void contextPrepared​(org.springframework.context.ConfigurableApplicationContext context)
        Called once the ApplicationContext has been created and prepared, but before sources have been loaded.
        Parameters:
        context - the application context
      • contextLoaded

        void contextLoaded​(org.springframework.context.ConfigurableApplicationContext context)
        Called once the application context has been loaded but before it has been refreshed.
        Parameters:
        context - the application context
      • started

        void started​(org.springframework.context.ConfigurableApplicationContext context)
        The context has been refreshed and the application has started but CommandLineRunners and ApplicationRunners have not been called.
        Parameters:
        context - the application context.
        Since:
        2.0.0
      • running

        void running​(org.springframework.context.ConfigurableApplicationContext context)
        Called immediately before the run method finishes, when the application context has been refreshed and all CommandLineRunners and ApplicationRunners have been called.
        Parameters:
        context - the application context.
        Since:
        2.0.0
      • failed

        void failed​(org.springframework.context.ConfigurableApplicationContext context,
                    Throwable exception)
        Called when a failure occurs when running the application.
        Parameters:
        context - the application context or null if a failure occurred before the context was created
        exception - the failure
        Since:
        2.0.0