@Component public class AnnotationScan extends Object implements org.springframework.context.SmartLifecycle
| 构造器和说明 |
|---|
AnnotationScan() |
| 限定符和类型 | 方法和说明 |
|---|---|
int |
getPhase()
如果工程中有多个实现接口SmartLifecycle的类,则这些类的start的执行顺序按getPhase方法返回值从小到大执行。
|
boolean |
isAutoStartup()
根据该方法的返回值决定是否执行start方法。
|
boolean |
isRunning()
1.
|
void |
start()
1.
|
void |
stop()
接口Lifecycle的子类的方法,只有非SmartLifecycle的子类才会执行该方法。
|
void |
stop(Runnable callback)
SmartLifecycle子类的才有的方法,当isRunning方法返回true时,该方法才会被调用。
|
public void start()
start 在接口中 org.springframework.context.Lifecyclepublic int getPhase()
getPhase 在接口中 org.springframework.context.Phasedpublic boolean isAutoStartup()
isAutoStartup 在接口中 org.springframework.context.SmartLifecyclepublic boolean isRunning()
isRunning 在接口中 org.springframework.context.Lifecyclepublic void stop(Runnable callback)
stop 在接口中 org.springframework.context.SmartLifecyclepublic void stop()
stop 在接口中 org.springframework.context.LifecycleCopyright © 2018. All rights reserved.