ClassLoader appClassloader = Play.classloader(Play.current());
ClassLoader libClassloader = getClass().getClassLoader();
ClassLoader[] classLoaders = new ClassLoader[] { appClassloader, libClassloader };
ConverterRegistry converters = new ClasspathScanningConverterRegistry(classLoaders);
models = new ClasspathScanningModelRegistry(converters, classLoaders);
ControllerRegistry crudControllers = new ClasspathScanningControllerRegistry(global, models, classLoaders);
dynamicRestController = new RouterRestController(crudControllers, models);
dynamicCrudController = new RouterCrudController(crudControllers, models, appClassloader);
instance = this;
}