## IBPS-V3标识生成基础工程 | SN | 撰写人 | 日期 | 内容 | | :-----:| :----: | :----: | :---- | | 1 | 徐强 | 2019-06-13 | 初始编撰 | Tags: IBPS-V3 [TOC] ### 工程说明 * 支持雪花分布式标识生成策略。 #### com.lc.ibps.cloud.identifier.config.IdConfig 唯一标识配置类,接收相关配置设置; * `id.type` 策略类型,支持`uuid`、`SnowFlake`; * `id.workerId` 策略`SnowFlake`参数,指定工作机器,默认值:0; * `id.datacenterId` 策略`SnowFlake`参数,指定数据中心,默认值:0; #### com.lc.ibps.cloud.identifier.IdGenerator 唯一标识生成接口,需要自定义标识生成策略的实现该接口并注入容器。 _ _ _ ### 使用说明 ``` public class BaseProvider { ... @Autowired private IdGenerator idGenerator; ... protected String uuid(){ return idGenerator.getId(); } } ```