IdGenerator { public String objectId() { return ObjectId.next(); }  synchronized String batchId(int tenantId, int module); @Deprecated synchronized String getBatchId(int tenantId, int module); String simpleUUID(); String randomUUID(); synchronized long snowflakeId(); synchronized long snowflakeId(long workerId, long dataCenterId); String objectId();  }
@Test public void testObjectID() { for (int i = 0; i < 100; i++) { String objectId = idGenerator.objectId(); System.out.println("objectId: " + objectId); } }