update 优化 工作流使用系统自带雪花生成器
This commit is contained in:
parent
dd54cc972a
commit
cb71df8a42
@ -276,7 +276,7 @@ websocket:
|
||||
--- # warm-flow工作流配置
|
||||
warm-flow:
|
||||
# 是否开启工作流,默认true
|
||||
enabled: false
|
||||
enabled: true
|
||||
# 是否开启设计器ui
|
||||
ui: true
|
||||
# 默认Authorization,如果有多个token,用逗号分隔
|
||||
|
@ -1,7 +1,12 @@
|
||||
package org.dromara.workflow.config;
|
||||
|
||||
|
||||
import com.baomidou.mybatisplus.core.incrementer.IdentifierGenerator;
|
||||
import org.dromara.warm.flow.core.config.WarmFlow;
|
||||
import org.dromara.warm.flow.core.utils.IdUtils;
|
||||
import org.dromara.warm.plugin.modes.sb.config.BeanConfig;
|
||||
import org.dromara.workflow.common.ConditionalOnEnable;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.context.annotation.Configuration;
|
||||
|
||||
/**
|
||||
@ -11,7 +16,16 @@ import org.springframework.context.annotation.Configuration;
|
||||
*/
|
||||
@ConditionalOnEnable
|
||||
@Configuration
|
||||
public class WarmFlowConfig {
|
||||
public class WarmFlowConfig extends BeanConfig {
|
||||
|
||||
@Autowired
|
||||
private IdentifierGenerator identifierGenerator;
|
||||
|
||||
@Override
|
||||
public void after(WarmFlow flowConfig) {
|
||||
// 设置Mybatis-Plus默认主键生成器
|
||||
IdUtils.setInstanceNative(() -> identifierGenerator.nextId(null).longValue());
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user