mirror of
http://git.pig4cloud.com/pig/pigx.git
synced 2026-11-11 13:19:01 +08:00
fix(boot): randomize MyBatis-Plus snowflake node IDs
This commit is contained in:
1 parent
1dad386954
commit
08a82ee09c
1 file changed
+4
@@ -68,6 +68,10 @@ mybatis-plus:
|
||||
where-strategy: not_empty
|
||||
insert-strategy: not_empty
|
||||
update-strategy: not_null
|
||||
# 雪花算法随机 worker-id / datacenter-id,避免多实例生成重复 ID (mybatis-plus#7135)
|
||||
sequence:
|
||||
worker-id: ${random.int(1,31)}
|
||||
datacenter-id: ${random.int(1,31)}
|
||||
type-handlers-package: com.pig4cloud.pigx.common.data.handler
|
||||
configuration:
|
||||
jdbc-type-for-null: 'null'
|
||||
|
||||
Reference in new issue
Block a user