System.out.println(BannerUtils.displayBanner(getClass().getSimpleName(), null));
ContainerBootstrapContext bootstrapContext = new ContainerBootstrapContext(new SingleNodeOptions());
SpringApplicationBuilder admin = new SpringApplicationBuilder(SingleNodeOptions.class,
ParentConfiguration.class)
.logStartupInfo(false)
.listeners(bootstrapContext.commandLineListener())
.profiles(XdProfiles.ADMIN_PROFILE, XdProfiles.SINGLENODE_PROFILE)
.initializers(new HsqldbServerProfileActivator())
.child(SharedServerContextConfiguration.class, SingleNodeOptions.class)
.logStartupInfo(false)
.listeners(bootstrapContext.commandLineListener())
.child(SingleNodeOptions.class, AdminServerApplication.class)
.main(AdminServerApplication.class)
.listeners(bootstrapContext.commandLineListener());
admin.showBanner(false);
admin.run(args);
SpringApplicationBuilder container = admin
.sibling(SingleNodeOptions.class, ContainerServerApplication.class)
.logStartupInfo(false)
.profiles(XdProfiles.CONTAINER_PROFILE, XdProfiles.SINGLENODE_PROFILE)
.listeners(ApplicationUtils.mergeApplicationListeners(bootstrapContext.commandLineListener(),
bootstrapContext.pluginContextInitializers()))
.child(ContainerConfiguration.class)
.main(ContainerServerApplication.class)
.listeners(bootstrapContext.commandLineListener())
.web(false);
container.showBanner(false);
container.run(args);
adminContext = admin.context();
containerContext = container.context();
pluginContext = (ConfigurableApplicationContext) containerContext.getParent();
return this;
}