解决id重复问题及shiro授权bug

yun-zuoyi
alwaysfrin 6 years ago
parent ab63dadb1c
commit 207b7ea7eb

@ -35,10 +35,10 @@ public class SnowflakeIdMaker {
private long twepoch = 1288834974657L;
private long workerIdBits = 5L;
private long workerIdBits = 10L;
private long datacenterIdBits = 5L;
private long maxWorkerId = -1L ^ (-1L << workerIdBits);
private long maxDatacenterId = -1L ^ (-1L << datacenterIdBits);
private long maxWorkerId = -1L ^ (-1L << workerIdBits); //1023
private long maxDatacenterId = -1L ^ (-1L << datacenterIdBits); //30
private long sequenceBits = 12L;
private long workerIdShift = sequenceBits;

Loading…
Cancel
Save