From 970eb892fb582410655aeabdef4a7a3c0364c04b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E6=9D=A8=E9=BB=84=E6=9E=97?= Date: Wed, 9 Feb 2022 13:02:44 +0800 Subject: [PATCH] =?UTF-8?q?=E6=B5=8B=E8=AF=95=E7=BA=BF=E7=A8=8B=E6=94=B9?= =?UTF-8?q?=E5=88=B050=E4=B8=AA=EF=BC=8C=E4=B8=80=E6=AC=A1=E7=94=9F?= =?UTF-8?q?=E6=88=90200=E4=B8=AA?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/main/java/com/yanghuanglin/springseq/config/Startup.java | 4 ++-- src/main/resources/application.yml | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/src/main/java/com/yanghuanglin/springseq/config/Startup.java b/src/main/java/com/yanghuanglin/springseq/config/Startup.java index 8538784..96323e3 100644 --- a/src/main/java/com/yanghuanglin/springseq/config/Startup.java +++ b/src/main/java/com/yanghuanglin/springseq/config/Startup.java @@ -25,8 +25,8 @@ public class Startup implements ApplicationRunner { Set set = new HashSet<>(); //开启多线程进行测试 - ThreadPoolExecutor threadPoolExecutor = new ThreadPoolExecutor(10, 10, 1, TimeUnit.MINUTES, new ArrayBlockingQueue<>(100)); - for (int i = 0; i < 5; i++) { + ThreadPoolExecutor threadPoolExecutor = new ThreadPoolExecutor(50, 50, 1, TimeUnit.MINUTES, new ArrayBlockingQueue<>(1000)); + for (int i = 0; i < 200; i++) { threadPoolExecutor.execute(() -> { Sequences sequences = generator.generate("SNT", "MISSION"); String formattedSeq = generator.format(sequences.getSeq(), 5, "处〔#year#〕10801#seq#"); diff --git a/src/main/resources/application.yml b/src/main/resources/application.yml index 00b3164..0746eb3 100644 --- a/src/main/resources/application.yml +++ b/src/main/resources/application.yml @@ -3,4 +3,4 @@ spring: url: jdbc:mysql://127.0.0.1:3306/sequence username: root password: root - driver-class-name: com.mysql.jdbc.Driver + driver-class-name: com.mysql.cj.jdbc.Driver