Module bus.starter

Class SpringSmartLifecycle

java.lang.Object
org.miaixz.bus.spring.boot.SpringSmartLifecycle
All Implemented Interfaces:
org.springframework.beans.factory.Aware, org.springframework.context.ApplicationContextAware, org.springframework.context.Lifecycle, org.springframework.context.Phased, org.springframework.context.SmartLifecycle

public class SpringSmartLifecycle extends Object implements org.springframework.context.SmartLifecycle, org.springframework.context.ApplicationContextAware
实现SmartLifecycle计算应用程序上下文刷新时间
Since:
Java 17+
Author:
Kimi Liu
  • Field Details

  • Constructor Details

    • SpringSmartLifecycle

      public SpringSmartLifecycle(StartupReporter startupReporter)
  • Method Details

    • setApplicationContext

      public void setApplicationContext(org.springframework.context.ApplicationContext applicationContext) throws org.springframework.beans.BeansException
      Specified by:
      setApplicationContext in interface org.springframework.context.ApplicationContextAware
      Throws:
      org.springframework.beans.BeansException
    • start

      public void start()
      Specified by:
      start in interface org.springframework.context.Lifecycle
    • stop

      public void stop()
      Specified by:
      stop in interface org.springframework.context.Lifecycle
    • isRunning

      public boolean isRunning()
      Specified by:
      isRunning in interface org.springframework.context.Lifecycle
    • getPhase

      public int getPhase()
      Specified by:
      getPhase in interface org.springframework.context.Phased
      Specified by:
      getPhase in interface org.springframework.context.SmartLifecycle