From c3d22f399a257f781cf53a2db92a26d40a37f8a2 Mon Sep 17 00:00:00 2001 From: smallchill Date: Wed, 24 Jul 2024 21:33:29 +0800 Subject: [PATCH] =?UTF-8?q?:tada:=20=E7=A7=BB=E9=99=A4=E7=9B=B8=E5=85=B3?= =?UTF-8?q?=E6=B3=A8=E8=A7=A3?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../core/launch/BladeApplication.java | 16 +++------------- 1 file changed, 3 insertions(+), 13 deletions(-) diff --git a/blade-core-launch/src/main/java/org/springblade/core/launch/BladeApplication.java b/blade-core-launch/src/main/java/org/springblade/core/launch/BladeApplication.java index b4c7bf2..1eccc83 100644 --- a/blade-core-launch/src/main/java/org/springblade/core/launch/BladeApplication.java +++ b/blade-core-launch/src/main/java/org/springblade/core/launch/BladeApplication.java @@ -50,20 +50,10 @@ public class BladeApplication { } public static SpringApplicationBuilder createSpringApplicationBuilder(String appName, Class source, String... args) { - return createSpringApplicationBuilder(null,appName, source, args); + return createSpringApplicationBuilder(null, appName, source, args); } - /** - * 兼容tomcat等外部容器启动,使用此方法时请按照1进行工程改造 - *
1-https://sns.bladex.cn/q-6813.html
- *
2-解决https://sns.bladex.cn/q-66.html问题
- * @param builder builder - * @param appName appName - * @param source source - * @param args args - * @return - */ - public static SpringApplicationBuilder createSpringApplicationBuilder(SpringApplicationBuilder builder,String appName, Class source, String... args){ + public static SpringApplicationBuilder createSpringApplicationBuilder(SpringApplicationBuilder builder, String appName, Class source, String... args) { Assert.hasText(appName, "[appName]服务名不能为空"); // 读取环境变量,使用spring boot的规则 ConfigurableEnvironment environment = new StandardEnvironment(); @@ -82,7 +72,7 @@ public class BladeApplication { // 当前使用 List activeProfileList = new ArrayList<>(profiles); Function joinFun = StringUtils::arrayToCommaDelimitedString; - if(builder==null){ + if (builder == null) { // 如果builder为空 创建 此操作将启动内嵌web容器 以jar模式启动 builder = new SpringApplicationBuilder(source); }