isCacheClassLoader
This commit is contained in:
@@ -143,7 +143,7 @@ class AppConfig {
|
||||
if (cacheClasses == null) {
|
||||
this.classLoader = new RedkaleClassLoader(currClassLoader);
|
||||
} else {
|
||||
this.classLoader = new RedkaleClassLoader.createCacheClassLoader(currClassLoader, cacheClasses);
|
||||
this.classLoader = RedkaleClassLoader.createCacheClassLoader(currClassLoader, cacheClasses);
|
||||
}
|
||||
Thread.currentThread().setContextClassLoader(this.classLoader);
|
||||
}
|
||||
|
||||
@@ -361,7 +361,7 @@ public final class Application {
|
||||
+ RESNAME_APP_HOME + " = " + this.home.getPath().replace('\\', '/') + "\r\n"
|
||||
+ RESNAME_APP_CONF_DIR + " = " + confDirStr.substring(confDirStr.indexOf('!') + 1));
|
||||
|
||||
if (!compileMode && !(classLoader instanceof RedkaleClassLoader.RedkaleCacheClassLoader)) {
|
||||
if (!compileMode && !RedkaleClassLoader.isCacheClassLoader(classLoader)) {
|
||||
String lib = environment.getPropertyValue(
|
||||
config.getValue("lib", "${APP_HOME}/libs/*").trim());
|
||||
lib = Utility.isEmpty(lib) ? confDirStr : (lib + ";" + confDirStr);
|
||||
|
||||
@@ -111,6 +111,10 @@ public class RedkaleClassLoader extends URLClassLoader {
|
||||
return new RedkaleCacheClassLoader(parent, classes);
|
||||
}
|
||||
|
||||
public static boolean isCacheClassLoader(ClassLoader loader) {
|
||||
return !(loader instanceof RedkaleCacheClassLoader);
|
||||
}
|
||||
|
||||
public static URI getConfResourceAsURI(String confURI, String file) {
|
||||
if (file.startsWith("http:") || file.startsWith("https:") || file.startsWith("ftp:")) {
|
||||
return URI.create(file);
|
||||
|
||||
Reference in New Issue
Block a user