From 7b0eb4104d33a89b78c0d7310baabff945db057b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E5=A6=82=E6=A2=A6=E6=8A=80=E6=9C=AF?= <596392912@qq.com> Date: Thu, 12 Sep 2024 11:23:33 +0800 Subject: [PATCH] =?UTF-8?q?:sparkles:=20=E4=BB=A3=E7=A0=81=E4=BC=98?= =?UTF-8?q?=E5=8C=96?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../java/org/springblade/core/test/BladeSpringExtension.java | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/blade-core-test/src/main/java/org/springblade/core/test/BladeSpringExtension.java b/blade-core-test/src/main/java/org/springblade/core/test/BladeSpringExtension.java index 8f11c31..7579a15 100644 --- a/blade-core-test/src/main/java/org/springblade/core/test/BladeSpringExtension.java +++ b/blade-core-test/src/main/java/org/springblade/core/test/BladeSpringExtension.java @@ -29,7 +29,6 @@ import org.springframework.lang.NonNull; import org.springframework.test.context.junit.jupiter.SpringExtension; import java.util.*; -import java.util.stream.Collectors; /** * 设置启动参数 @@ -74,7 +73,7 @@ public class BladeSpringExtension extends SpringExtension { List launcherList = new ArrayList<>(); SpringApplicationBuilder builder = new SpringApplicationBuilder(clazz); ServiceLoader.load(LauncherService.class).forEach(launcherList::add); - launcherList.stream().sorted(Comparator.comparing(LauncherService::getOrder)).collect(Collectors.toList()) + launcherList.stream().sorted(Comparator.comparing(LauncherService::getOrder)).toList() .forEach(launcherService -> launcherService.launcher(builder, appName, profile)); } System.err.printf("---[junit.test]:[%s]---启动中,读取到的环境变量:[%s]%n", appName, profile);