private ApplicationContext applicationContext;
@Override
public Promise<String> deploy(String springTemplate) {
Resource templateResource = new ByteArrayResource(springTemplate.getBytes());
GenericXmlApplicationContext appContext = new GenericXmlApplicationContext();
appContext.setParent(applicationContext);
appContext.load(templateResource);
appContext.refresh();
ApplicationStack applicationStack = appContext.getBean("applicationStack", ApplicationStack.class);
applicationStack.deploy();
return applicationStack.getUrl();
}