public ContainerServerApplication run(String... args) { System.out.println(BannerUtils.displayBanner(getClass().getSimpleName(), null)); try { ContainerBootstrapContext bootstrapContext = new ContainerBootstrapContext(new ContainerOptions()); MessageBusClassLoaderFactory classLoaderFactory = new MessageBusClassLoaderFactory(); this.containerContext = new SpringApplicationBuilder(ContainerOptions.class, ParentConfiguration.class) .logStartupInfo(false) .profiles(XdProfiles.CONTAINER_PROFILE) .listeners(bootstrapContext.commandLineListener()) .listeners(classLoaderFactory) .child(SharedServerContextConfiguration.class, ContainerOptions.class) .resourceLoader(classLoaderFactory.getResolver()) .logStartupInfo(false) .listeners(bootstrapContext.commandLineListener()) .child(ContainerServerApplication.class) .logStartupInfo(false) .listeners( ApplicationUtils.mergeApplicationListeners( bootstrapContext.commandLineListener(), bootstrapContext.pluginContextInitializers())) .child(ContainerConfiguration.class) .listeners(bootstrapContext.commandLineListener()) .initializers(new IdInitializer()) .showBanner(false) .run(args); } catch (Exception e) { handleFieldErrors(e); } return this; }
public void dumpContextConfiguration() { ApplicationUtils.dumpContainerApplicationContextConfiguration(this.containerContext); }