优化对spring boot支持的配置

This commit is contained in:
bryan.zhang
2019-04-04 14:57:18 +08:00
parent 4bfc23f4bd
commit 3a17abff5c
5 changed files with 12 additions and 12 deletions

View File

@@ -1,15 +1,16 @@
package com.thebeastshop.liteflow.springboot;
import com.thebeastshop.liteflow.core.FlowExecutor;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;
import org.springframework.beans.factory.InitializingBean;
import javax.annotation.Resource;
@Configuration
public class LiteflowExecutorInit {
public class LiteflowExecutorInit implements InitializingBean {
@Bean
public String initExecutor(FlowExecutor flowExecutor){
@Resource
private FlowExecutor flowExecutor;
@Override
public void afterPropertiesSet() throws Exception {
flowExecutor.init();
return "init";
}
}