From 0e4604eb1c30677584b5e12d5557e98f33257428 Mon Sep 17 00:00:00 2001 From: YanZhipeng-UESTC Date: Fri, 22 Nov 2024 16:21:17 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E5=A4=8D=E9=9D=99=E6=80=81=E5=90=88?= =?UTF-8?q?=E5=B9=B6=E9=83=A8=E7=BD=B2=E6=97=B6=EF=BC=8Cspringcloud?= =?UTF-8?q?=E4=BE=9D=E8=B5=96=E5=85=BC=E5=AE=B9=E6=80=A7=E9=97=AE=E9=A2=98?= =?UTF-8?q?=E5=AF=BC=E8=87=B4=E6=A8=A1=E5=9D=97=E5=85=88=E4=BA=8E=E5=9F=BA?= =?UTF-8?q?=E5=BA=A7=E8=A2=AB=E5=8A=A0=E8=BD=BD=E7=9A=84=E9=97=AE=E9=A2=98?= =?UTF-8?q?(#1032)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../ark/springboot/listener/ArkDeployStaticBizListener.java | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/sofa-ark-parent/support/ark-springboot-integration/ark-springboot-starter/src/main/java/com/alipay/sofa/ark/springboot/listener/ArkDeployStaticBizListener.java b/sofa-ark-parent/support/ark-springboot-integration/ark-springboot-starter/src/main/java/com/alipay/sofa/ark/springboot/listener/ArkDeployStaticBizListener.java index 2cbbbfe8b..562ed46c9 100644 --- a/sofa-ark-parent/support/ark-springboot-integration/ark-springboot-starter/src/main/java/com/alipay/sofa/ark/springboot/listener/ArkDeployStaticBizListener.java +++ b/sofa-ark-parent/support/ark-springboot-integration/ark-springboot-starter/src/main/java/com/alipay/sofa/ark/springboot/listener/ArkDeployStaticBizListener.java @@ -18,6 +18,7 @@ import com.alipay.sofa.ark.api.ArkConfigs; import com.alipay.sofa.ark.support.startup.EmbedSofaArkBootstrap; +import org.springframework.boot.web.context.ConfigurableWebServerApplicationContext; import org.springframework.context.ApplicationListener; import org.springframework.context.event.ApplicationContextEvent; import org.springframework.context.event.ContextRefreshedEvent; @@ -33,7 +34,8 @@ public void onApplicationEvent(ApplicationContextEvent event) { return; } if (ArkConfigs.isEmbedEnable() && ArkConfigs.isEmbedStaticBizEnable()) { - if (event instanceof ContextRefreshedEvent) { + if (event instanceof ContextRefreshedEvent + && event.getApplicationContext() instanceof ConfigurableWebServerApplicationContext) { // After the master biz is started, statically deploy the other biz from classpath EmbedSofaArkBootstrap.deployStaticBizAfterEmbedMasterBizStarted(); }