|
1. 雪花Id生成器
2. 实现接口重写方法
- @Configuration
- public class FlowableConfiguration implements EngineConfigurationConfigurer<SpringProcessEngineConfiguration>
- {
- @Override
- public void configure(SpringProcessEngineConfiguration springProcessEngineConfiguration) {
- springProcessEngineConfiguration.setIdGenerator(new IdGenerator() {
- @Override
- public String getNextId() {
- try {
- return Snowflake.getSnowflakeId(); //id生成方法
- }catch (Exception e) {
- }
- return null;
- }
- });
- }
- }
复制代码
3. 完成
|
|