|
|
@@ -33,7 +33,7 @@ public class JDBCIdGenerator {
|
|
|
|
|
|
private static final Logger logger = LoggerFactory.getLogger(JDBCIdGenerator.class);
|
|
|
|
|
|
- private static long workerId;
|
|
|
+ private static long workerId =1001;
|
|
|
|
|
|
static {
|
|
|
Calendar calendar = Calendar.getInstance();
|
|
|
@@ -51,7 +51,8 @@ public class JDBCIdGenerator {
|
|
|
private long lastTime;
|
|
|
|
|
|
static void initWorkerId() {
|
|
|
- String workerId = System.getProperty("jdbc.worker.id");
|
|
|
+// String workerId = System.getProperty("jdbc.worker.id");
|
|
|
+ String workerId = "1002";
|
|
|
if (StringUtils.isNoneBlank(workerId)) {
|
|
|
setWorkerId(Long.valueOf(workerId));
|
|
|
return;
|
|
|
@@ -71,7 +72,7 @@ public class JDBCIdGenerator {
|
|
|
* 工作进程Id
|
|
|
*/
|
|
|
public static void setWorkerId(final Long workerId) {
|
|
|
- LoggerUtils.debug(logger, "工作进程ID:[%s]", workerId);
|
|
|
+// LoggerUtils.debug(logger, "工作进程ID:[%s]", workerId);
|
|
|
Assert.isTrue(workerId > 0L && workerId < WORKER_ID_MAX_VALUE, "工作进程ID不能为空,且小于1024");
|
|
|
JDBCIdGenerator.workerId = workerId;
|
|
|
}
|