类 ApplicationReadyEvent
java.lang.Object
java.util.EventObject
org.springframework.context.ApplicationEvent
org.springframework.boot.context.event.SpringApplicationEvent
org.springframework.boot.context.event.ApplicationReadyEvent
- 所有已实现的接口:
Serializable
Event published as late as conceivably possible to indicate that the application is
ready to service requests. The source of the event is the
SpringApplication
itself, but beware of modifying its internal state since all initialization steps will
have been completed by then.- 从以下版本开始:
- 1.3.0
- 作者:
- Stephane Nicoll, Chris Bono
- 另请参阅:
-
字段概要
从类继承的字段 java.util.EventObject
source
-
构造器概要
构造器构造器说明ApplicationReadyEvent
(SpringApplication application, String[] args, ConfigurableApplicationContext context, Duration timeTaken) Create a newApplicationReadyEvent
instance. -
方法概要
修饰符和类型方法说明Return the application context.Return the time taken for the application to be ready to service requests, ornull
if unknown.从类继承的方法 org.springframework.boot.context.event.SpringApplicationEvent
getArgs, getSpringApplication
从类继承的方法 org.springframework.context.ApplicationEvent
getTimestamp
从类继承的方法 java.util.EventObject
getSource, toString
-
构造器详细资料
-
ApplicationReadyEvent
public ApplicationReadyEvent(SpringApplication application, String[] args, ConfigurableApplicationContext context, Duration timeTaken) Create a newApplicationReadyEvent
instance.- 参数:
application
- the current applicationargs
- the arguments the application is running withcontext
- the context that was being createdtimeTaken
- the time taken to get the application ready to service requests- 从以下版本开始:
- 2.6.0
-
-
方法详细资料
-
getApplicationContext
Return the application context.- 返回:
- the context
-
getTimeTaken
Return the time taken for the application to be ready to service requests, ornull
if unknown.- 返回:
- the time taken to be ready to service requests
- 从以下版本开始:
- 2.6.0
-