pan a272e06018 1、新增文档分类管理
2、新增资源管理开发
2024-08-28 17:40:03 +08:00

27 lines
598 B
Java

package com.rzdata.common.config;
import cn.hutool.core.lang.Snowflake;
import org.springframework.beans.factory.annotation.Value;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;
/**
* 雪花算法订单号生成
* @author lanhai
*/
@Configuration
public class SnowflakeConfig {
@Value("${application.datacenterId}")
private Long datacenterId;
@Value("${application.workerId}")
private Long workerId;
@Bean
public Snowflake snowflake() {
return new Snowflake(workerId, datacenterId);
}
}