seq版本升级为1.1.0
This commit is contained in:
@@ -21,10 +21,10 @@ public class SeqGeneratorConfig {
|
||||
@Bean
|
||||
public TableConfig tableConfig() {
|
||||
TableConfig tableConfig = new TableConfig();
|
||||
// tableConfig.setTable("sequences");
|
||||
// tableConfig.setKeyColumn("SEQUENCE_KEY");
|
||||
// tableConfig.setTypeColumn("SEQUENCE_TYPE");
|
||||
// tableConfig.setSeqColumn("SEQUENCE_NEXT_ID");
|
||||
tableConfig.setTable("sequences");
|
||||
tableConfig.setKeyColumn("SEQUENCE_KEY");
|
||||
tableConfig.setTypeColumn("SEQUENCE_TYPE");
|
||||
tableConfig.setSeqColumn("NEXT_ID");
|
||||
return tableConfig;
|
||||
}
|
||||
|
||||
|
||||
@@ -27,9 +27,12 @@ public class Startup implements ApplicationRunner {
|
||||
//开启多线程进行测试
|
||||
ThreadPoolExecutor threadPoolExecutor = new ThreadPoolExecutor(50, 50, 1, TimeUnit.MINUTES, new ArrayBlockingQueue<>(1000));
|
||||
for (int i = 0; i < 200; i++) {
|
||||
int finalI = i;
|
||||
threadPoolExecutor.execute(() -> {
|
||||
Sequences sequences = generator.generate("SNT", "MISSION");
|
||||
String formattedSeq = generator.format(sequences.getSeq(), 5, "处〔#year#〕10801#seq#");
|
||||
if(finalI %5==4)
|
||||
System.out.println(3/0);
|
||||
generator.lock(sequences);
|
||||
set.add(formattedSeq);
|
||||
System.out.println(formattedSeq);
|
||||
|
||||
Reference in New Issue
Block a user