protected void addCliClasses(JarWriter writer) throws IOException { addClass(writer, PackagedSpringApplicationLauncher.class); addClass(writer, SpringApplicationLauncher.class); Resource[] resources = new PathMatchingResourcePatternResolver() .getResources("org/springframework/boot/groovy/**"); for (Resource resource : resources) { String url = resource.getURL().toString(); addResource(writer, resource, url.substring(url.indexOf("org/springframework/boot/groovy/"))); } }
@Override public void run() { synchronized (this.monitor) { try { this.applicationContext = new SpringApplicationLauncher( getContextClassLoader()).launch(this.compiledSources, SpringApplicationRunner.this.args); } catch (Exception ex) { ex.printStackTrace(); } } }
@Override public void run() { try { this.applicationContext = new SpringApplicationLauncher( getContextClassLoader()).launch(this.compiledSources, SpringApplicationRunner.this.args); } catch (Exception ex) { ex.printStackTrace(); } }
private void run(String[] args) throws Exception { URLClassLoader classLoader = (URLClassLoader) Thread.currentThread() .getContextClassLoader(); new SpringApplicationLauncher(classLoader).launch(getSources(classLoader), args); }