public Object launch(Class<?>[] sources, String[] args) throws Exception {
		Map<String, Object> defaultProperties = new HashMap<>();
		defaultProperties.put("spring.groovy.template.check-template-location", "false");
		Class<?> applicationClass = this.classLoader
				.loadClass(getSpringApplicationClassName());
		Constructor<?> constructor = applicationClass.getConstructor(Class[].class);
		Object application = constructor.newInstance((Object) sources);
		applicationClass.getMethod("setDefaultProperties", Map.class).invoke(application,
				defaultProperties);
		Method method = applicationClass.getMethod("run", String[].class);
		return method.invoke(application, (Object) args);
	}
public Object launch ( Class < ? > [ ] sources , String [ ] args ) throws Exception { Map < String , Object > defaultProperties = new HashMap < > ( ) ; defaultProperties . put ( "spring.groovy.template.check-template-location" , "false" ) ; Class < ? > applicationClass = this . classLoader . loadClass ( getSpringApplicationClassName ( ) ) ; Constructor < ? > constructor = applicationClass . getConstructor ( Class [ ] . class ) ; Object application = constructor . newInstance ( ( Object ) sources ) ; applicationClass . getMethod ( "setDefaultProperties" , Map . class ) . invoke ( application , defaultProperties ) ; Method method = applicationClass . getMethod ( "run" , String [ ] . class ) ; return method . invoke ( application , ( Object ) args ) ; }
Launches the application created using the given {@code sources}. The application
is launched with the given {@code args}.
@param sources the sources for the application
@param args the args for the application
@return the application's {@code ApplicationContext}
@throws Exception if the launch fails