类 ApplicationStartedEvent

所有已实现的接口:
Serializable

public class ApplicationStartedEvent extends SpringApplicationEvent
Event published once the application context has been refreshed but before any application and command line runners have been called.
从以下版本开始:
2.0.0
作者:
Andy Wilkinson
另请参阅:
  • 构造器详细资料

    • ApplicationStartedEvent

      public ApplicationStartedEvent(SpringApplication application, String[] args, ConfigurableApplicationContext context, Duration timeTaken)
      Create a new ApplicationStartedEvent instance.
      参数:
      application - the current application
      args - the arguments the application is running with
      context - the context that was being created
      timeTaken - the time taken to start the application
      从以下版本开始:
      2.6.0
  • 方法详细资料

    • getApplicationContext

      public ConfigurableApplicationContext getApplicationContext()
      Return the application context.
      返回:
      the context
    • getTimeTaken

      public Duration getTimeTaken()
      Return the time taken to start the application, or null if unknown.
      返回:
      the startup time
      从以下版本开始:
      2.6.0