Class LoggingSmartLifecycle
- java.lang.Object
-
- io.microsphere.spring.context.lifecycle.AbstractSmartLifecycle
-
- io.microsphere.spring.context.lifecycle.LoggingSmartLifecycle
-
- All Implemented Interfaces:
org.springframework.context.Lifecycle,org.springframework.context.Phased,org.springframework.context.SmartLifecycle
public class LoggingSmartLifecycle extends AbstractSmartLifecycle
ASmartLifecycleimplementation that logs lifecycle events for debugging and monitoring purposes.This class extends
AbstractSmartLifecycleand provides logging capabilities for lifecycle methods such asdoStart()anddoStop(). The logging is performed using theLoggerinterface provided by the MicroSphere logging framework.Example Usage
To use this class in a Spring application context, simply define it as a bean:
{@code- Since:
- 1.0.0
- Author:
- Mercy
- See Also:
AbstractSmartLifecycle,SmartLifecycle,Logger
-
-
Field Summary
-
Fields inherited from class io.microsphere.spring.context.lifecycle.AbstractSmartLifecycle
DEFAULT_PHASE, EARLIEST_PHASE, LATEST_PHASE
-
-
Constructor Summary
Constructors Constructor Description LoggingSmartLifecycle()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description protected voiddoStart()protected voiddoStop()-
Methods inherited from class io.microsphere.spring.context.lifecycle.AbstractSmartLifecycle
getPhase, isAutoStartup, isRunning, isStarted, setPhase, setStarted, start, stop, stop
-
-
-
-
Method Detail
-
doStart
protected void doStart()
- Specified by:
doStartin classAbstractSmartLifecycle
-
doStop
protected void doStop()
- Specified by:
doStopin classAbstractSmartLifecycle
-
-