From 804ceba0078d4aa91313c22c683e16f23ff41926 Mon Sep 17 00:00:00 2001 From: TS-QD1 Date: Sun, 26 Nov 2023 22:20:30 +0800 Subject: [PATCH 1/3] =?UTF-8?q?=E5=A4=84=E7=90=86=E5=A4=9A=E7=BA=BF?= =?UTF-8?q?=E7=A8=8B=E9=97=AE=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../service/population/impl/PopulationServiceImpl.java | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/main/java/com/cm/population/service/population/impl/PopulationServiceImpl.java b/src/main/java/com/cm/population/service/population/impl/PopulationServiceImpl.java index a015e91..dc0d356 100644 --- a/src/main/java/com/cm/population/service/population/impl/PopulationServiceImpl.java +++ b/src/main/java/com/cm/population/service/population/impl/PopulationServiceImpl.java @@ -470,11 +470,14 @@ public class PopulationServiceImpl extends AbstractService implements IPopulatio List populationInfoBaseDTOs = new ArrayList<>(); int size = populationInfoIds.size(); int numThreads = size / 2 + (size % 2 == 0 ? 0 : 1); // 计算需要的线程数 + numThreads = numThreads == 0 ? 1 : numThreads; + ExecutorService executorService = Executors.newFixedThreadPool(numThreads); List>> futures = new ArrayList<>(); // 将populationInfoIds分割成多个子列表,每个子列表由一个任务处理 int chunkSize = (int) Math.ceil((double) populationInfoIds.size() / numThreads); + chunkSize = chunkSize == 0? 1 : chunkSize; List> chunks = Lists.partition(populationInfoIds, chunkSize); for (List chunk : chunks) { From a259b0adbde5b3bb0e3c32a867c8c9c089ef82d8 Mon Sep 17 00:00:00 2001 From: TS-QD1 Date: Sun, 26 Nov 2023 22:21:29 +0800 Subject: [PATCH 2/3] =?UTF-8?q?=E6=94=BE=E5=BC=80=E8=B7=A8=E5=9F=9F?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../com/cm/population/config/AuthClientSecurityConfig.java | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/main/java/com/cm/population/config/AuthClientSecurityConfig.java b/src/main/java/com/cm/population/config/AuthClientSecurityConfig.java index 02f8d5e..0256f67 100644 --- a/src/main/java/com/cm/population/config/AuthClientSecurityConfig.java +++ b/src/main/java/com/cm/population/config/AuthClientSecurityConfig.java @@ -41,6 +41,7 @@ public class AuthClientSecurityConfig extends WebSecurityConfigurerAdapter { .and() .logout().logoutSuccessUrl(authServer.getOauthLogout()) .and() +// .authorizeRequests().antMatchers("/app/**", "/resource/**", "/route/file/**", "/assets/**","/route/bigdata/**", "/route/populationinfo-data/**", .authorizeRequests().antMatchers("/app/**", "/resource/**", "/route/file/**", "/assets/**","/route/bigdata/**", "/api/**").permitAll() .and() @@ -48,7 +49,7 @@ public class AuthClientSecurityConfig extends WebSecurityConfigurerAdapter { .anyRequest() .access("@clientRbacService.hasPermission(request, authentication)") .and() - .headers().frameOptions().sameOrigin() + .headers().frameOptions().disable() .and() .cors() .and() From 6cdef206bea64097f18702997fdc4ebf12ea977f Mon Sep 17 00:00:00 2001 From: TS-QD1 Date: Sun, 26 Nov 2023 22:24:49 +0800 Subject: [PATCH 3/3] =?UTF-8?q?=E6=B3=A8=E9=87=8A=E8=B0=83=E8=AF=95?= =?UTF-8?q?=E6=8C=89=E9=92=AE?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/main/resources/templates/populationinfo/list.html | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/main/resources/templates/populationinfo/list.html b/src/main/resources/templates/populationinfo/list.html index 149a8ef..5db22a3 100644 --- a/src/main/resources/templates/populationinfo/list.html +++ b/src/main/resources/templates/populationinfo/list.html @@ -79,9 +79,9 @@ - + + +