Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

修复静态合并部署时,springcloud依赖兼容性问题导致模块先于基座被加载的问题(#1032) #1033

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand All @@ -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) {
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

如果master biz 非web应用,也无法走进这个if

// After the master biz is started, statically deploy the other biz from classpath
EmbedSofaArkBootstrap.deployStaticBizAfterEmbedMasterBizStarted();
}
Expand Down
Loading