类 ContextLifecycleScheduledTaskRegistrar
- java.lang.Object
- org.springframework.scheduling.config.ScheduledTaskRegistrar
- org.springframework.scheduling.config.ContextLifecycleScheduledTaskRegistrar
public class ContextLifecycleScheduledTaskRegistrar extends ScheduledTaskRegistrar implements SmartInitializingSingleton
ScheduledTaskRegistrarsubclass which redirects the actual scheduling of tasks to theafterSingletonsInstantiated()callback (as of 4.1.2).- 从以下版本开始:
- 3.2.1
- 作者:
- Juergen Hoeller
构造器概要
构造器 构造器 说明 ContextLifecycleScheduledTaskRegistrar()
方法概要
所有方法 实例方法 具体方法 修饰符和类型 方法 说明 voidafterPropertiesSet()CallsScheduledTaskRegistrar.scheduleTasks()at bean construction time.voidafterSingletonsInstantiated()Invoked right at the end of the singleton pre-instantiation phase, with a guarantee that all regular singleton beans have been created already.从类继承的方法 org.springframework.scheduling.config.ScheduledTaskRegistrar
addCronTask, addCronTask, addFixedDelayTask, addFixedDelayTask, addFixedRateTask, addFixedRateTask, addTriggerTask, addTriggerTask, destroy, getCronTaskList, getFixedDelayTaskList, getFixedRateTaskList, getScheduler, getTriggerTaskList, hasTasks, scheduleCronTask, scheduleFixedDelayTask, scheduleFixedRateTask, scheduleTasks, scheduleTriggerTask, setCronTasks, setCronTasksList, setFixedDelayTasks, setFixedDelayTasksList, setFixedRateTasks, setFixedRateTasksList, setScheduler, setTaskScheduler, setTriggerTasks, setTriggerTasksList
构造器详细资料
ContextLifecycleScheduledTaskRegistrar
public ContextLifecycleScheduledTaskRegistrar()
方法详细资料
afterPropertiesSet
public void afterPropertiesSet()
从类复制的说明:ScheduledTaskRegistrarCallsScheduledTaskRegistrar.scheduleTasks()at bean construction time.
afterSingletonsInstantiated
public void afterSingletonsInstantiated()
从接口复制的说明:SmartInitializingSingletonInvoked right at the end of the singleton pre-instantiation phase, with a guarantee that all regular singleton beans have been created already.ListableBeanFactory.getBeansOfType(java.lang.Class<T>)calls within this method won't trigger accidental side effects during bootstrap.NOTE: This callback won't be triggered for singleton beans lazily initialized on demand after
BeanFactorybootstrap, and not for any other bean scope either. Carefully use it for beans with the intended bootstrap semantics only.