use of org.craftercms.engine.util.groovy.ContentStoreGroovyResourceLoader in project engine by craftercms.
the class GroovyScriptFactoryTest method createGroovyClassLoader.
private GroovyClassLoader createGroovyClassLoader() {
ContentStoreGroovyResourceLoader resourceLoader = new ContentStoreGroovyResourceLoader(SiteContext.getCurrent(), "/classes");
GroovyClassLoader classLoader = new GroovyClassLoader(getClass().getClassLoader());
classLoader.setResourceLoader(resourceLoader);
return classLoader;
}
use of org.craftercms.engine.util.groovy.ContentStoreGroovyResourceLoader in project engine by craftercms.
the class SiteContextFactory method getClassLoader.
protected URLClassLoader getClassLoader(SiteContext siteContext) {
ContentStoreGroovyResourceLoader resourceLoader = new ContentStoreGroovyResourceLoader(siteContext, groovyClassesPath);
GroovyClassLoader classLoader = new GroovyClassLoader(getClass().getClassLoader());
classLoader.setResourceLoader(resourceLoader);
return classLoader;
}
Aggregations