use of com.alipay.sofa.isle.loader.SpringContextLoader in project sofa-boot by sofastack.
the class SpringContextInstallStage method doProcess.
private void doProcess(ApplicationRuntimeModel application) throws Exception {
outputModulesMessage(application);
SpringContextLoader springContextLoader = createSpringContextLoader();
installSpringContext(application, springContextLoader);
if (sofaModuleProperties.isModuleStartUpParallel()) {
refreshSpringContextParallel(application);
} else {
refreshSpringContext(application);
}
}
use of com.alipay.sofa.isle.loader.SpringContextLoader in project sofa-boot by alipay.
the class BeanHierarchyTest method refreshApplication.
private void refreshApplication(ApplicationRuntimeModel application) throws Exception {
DefaultListableBeanFactory rootBeanFactory = new DefaultListableBeanFactory();
ConfigurableApplicationContext rootApplicationContext = new GenericApplicationContext(rootBeanFactory);
rootApplicationContext.refresh();
SofaModuleProperties sofaModuleProperties = new SofaModuleProperties();
sofaModuleProperties.setBeanLoadCost(1);
rootBeanFactory.registerSingleton("sofaModuleProperties", sofaModuleProperties);
rootBeanFactory.registerSingleton(SofaBootConstants.PROCESSORS_OF_ROOT_APPLICATION_CONTEXT, new HashMap<>());
SpringContextLoader springContextLoader = new DynamicSpringContextLoader(rootApplicationContext);
for (DeploymentDescriptor dd : application.getResolvedDeployments()) {
if (dd.isSpringPowered()) {
springContextLoader.loadSpringContext(dd, application);
ConfigurableApplicationContext ctx = (ConfigurableApplicationContext) dd.getApplicationContext();
dd.startDeploy();
ctx.refresh();
dd.deployFinish();
}
}
}
use of com.alipay.sofa.isle.loader.SpringContextLoader in project sofa-boot by alipay.
the class SpringContextInstallStage method doProcess.
private void doProcess(ApplicationRuntimeModel application) throws Exception {
outputModulesMessage(application);
SpringContextLoader springContextLoader = createSpringContextLoader();
installSpringContext(application, springContextLoader);
if (sofaModuleProperties.isModuleStartUpParallel()) {
refreshSpringContextParallel(application);
} else {
refreshSpringContext(application);
}
}
use of com.alipay.sofa.isle.loader.SpringContextLoader in project sofa-boot by sofastack.
the class BeanHierarchyTest method refreshApplication.
private void refreshApplication(ApplicationRuntimeModel application) throws Exception {
DefaultListableBeanFactory rootBeanFactory = new DefaultListableBeanFactory();
ConfigurableApplicationContext rootApplicationContext = new GenericApplicationContext(rootBeanFactory);
rootApplicationContext.refresh();
SofaModuleProperties sofaModuleProperties = new SofaModuleProperties();
sofaModuleProperties.setBeanLoadCost(1);
rootBeanFactory.registerSingleton("sofaModuleProperties", sofaModuleProperties);
rootBeanFactory.registerSingleton(SofaBootConstants.PROCESSORS_OF_ROOT_APPLICATION_CONTEXT, new HashMap<>());
SpringContextLoader springContextLoader = new DynamicSpringContextLoader(rootApplicationContext);
for (DeploymentDescriptor dd : application.getResolvedDeployments()) {
if (dd.isSpringPowered()) {
springContextLoader.loadSpringContext(dd, application);
ConfigurableApplicationContext ctx = (ConfigurableApplicationContext) dd.getApplicationContext();
dd.startDeploy();
ctx.refresh();
dd.deployFinish();
}
}
}
Aggregations