feat: 新增 SequenceAllocator 号段预分配器
- 创建 SequenceAllocator 组件,支持号段预分配和分布式锁实时两种策略 - 使用 @Lock4j 注解实现分布式锁,通过自注入模式解决 Spring AOP 内部调用问题 - 本地 ConcurrentHashMap 缓存号段,AtomicLong 做内存 CAS 递增 - 补位格式化支持自定义补位字符和长度 - 重置维度支持 DAY/MONTH/YEAR/GLOBAL - 添加 nl-spring-boot-starter-protection 依赖
This commit is contained in:
@@ -46,6 +46,10 @@
|
||||
<groupId>cn.nl.cloud</groupId>
|
||||
<artifactId>nl-spring-boot-starter-biz-ip</artifactId>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>cn.nl.cloud</groupId>
|
||||
<artifactId>nl-spring-boot-starter-protection</artifactId>
|
||||
</dependency>
|
||||
<!-- 需要时候自行引入 -->
|
||||
|
||||
<!-- Web 相关 -->
|
||||
|
||||
Reference in New Issue
Block a user