All Downloads are FREE. Search and download functionalities are using the official Maven repository.

com.yomahub.liteflow.springboot.LiteflowExecutorInit Maven / Gradle / Ivy

There is a newer version: 2.12.4.2
Show newest version
package com.yomahub.liteflow.springboot;

import com.yomahub.liteflow.core.FlowExecutor;
import com.yomahub.liteflow.flow.FlowBus;
import org.springframework.beans.factory.SmartInitializingSingleton;

/**
 * 执行器初始化类 主要用于在启动时执行执行器的初始化方法,避免在运行执行器时第一次初始化而耗费时间
 *
 * @author Bryan.Zhang
 */
public class LiteflowExecutorInit implements SmartInitializingSingleton {

	private final FlowExecutor flowExecutor;

	public LiteflowExecutorInit(FlowExecutor flowExecutor) {
		this.flowExecutor = flowExecutor;
	}
	@Override
	public void afterSingletonsInstantiated() {
		flowExecutor.init(true);
		FlowBus.needInit();
	}
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy