This commit is contained in:
@@ -680,21 +680,21 @@ public final class Application {
|
|||||||
runServers(timecd, watchs); //必须在所有服务都启动后再启动WATCH服务
|
runServers(timecd, watchs); //必须在所有服务都启动后再启动WATCH服务
|
||||||
timecd.await();
|
timecd.await();
|
||||||
//if (!singletonrun) signalHandle();
|
//if (!singletonrun) signalHandle();
|
||||||
if (!singletonrun) clearPersistData();
|
//if (!singletonrun) clearPersistData();
|
||||||
logger.info(this.getClass().getSimpleName() + " started in " + (System.currentTimeMillis() - startTime) + " ms\r\n");
|
logger.info(this.getClass().getSimpleName() + " started in " + (System.currentTimeMillis() - startTime) + " ms\r\n");
|
||||||
if (!singletonrun) this.serversLatch.await();
|
if (!singletonrun) this.serversLatch.await();
|
||||||
}
|
}
|
||||||
|
|
||||||
private void clearPersistData() {
|
// private void clearPersistData() {
|
||||||
File cachedir = new File(home, "cache");
|
// File cachedir = new File(home, "cache");
|
||||||
if (!cachedir.isDirectory()) return;
|
// if (!cachedir.isDirectory()) return;
|
||||||
File[] lfs = cachedir.listFiles();
|
// File[] lfs = cachedir.listFiles();
|
||||||
if (lfs != null) {
|
// if (lfs != null) {
|
||||||
for (File file : lfs) {
|
// for (File file : lfs) {
|
||||||
if (file.getName().startsWith("persist-")) file.delete();
|
// if (file.getName().startsWith("persist-")) file.delete();
|
||||||
}
|
// }
|
||||||
}
|
// }
|
||||||
}
|
// }
|
||||||
|
|
||||||
// private void signalHandle() {
|
// private void signalHandle() {
|
||||||
// //http://www.comptechdoc.org/os/linux/programming/linux_pgsignals.html
|
// //http://www.comptechdoc.org/os/linux/programming/linux_pgsignals.html
|
||||||
|
|||||||
@@ -551,12 +551,11 @@ public final class ClassFilter<T> {
|
|||||||
} else if (root.isDirectory()) {
|
} else if (root.isDirectory()) {
|
||||||
if (exclude != null && exclude.equals(root)) return;
|
if (exclude != null && exclude.equals(root)) return;
|
||||||
File[] lfs = root.listFiles();
|
File[] lfs = root.listFiles();
|
||||||
if (lfs != null) {
|
if (lfs == null) throw new RuntimeException("File(" + root + ") cannot listFiles()");
|
||||||
for (File f : lfs) {
|
for (File f : lfs) {
|
||||||
loadClassFiles(exclude, f, files);
|
loadClassFiles(exclude, f, files);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -397,12 +397,11 @@ public abstract class Server<K extends Serializable, C extends Context, R extend
|
|||||||
File root = new File(s.substring(0, s.length() - 1));
|
File root = new File(s.substring(0, s.length() - 1));
|
||||||
if (root.isDirectory()) {
|
if (root.isDirectory()) {
|
||||||
File[] lfs = root.listFiles();
|
File[] lfs = root.listFiles();
|
||||||
if (lfs != null) {
|
if (lfs == null) throw new RuntimeException("File(" + root + ") cannot listFiles()");
|
||||||
for (File f : lfs) {
|
for (File f : lfs) {
|
||||||
set.add(f.toURI().toURL());
|
set.add(f.toURI().toURL());
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
|
||||||
} else {
|
} else {
|
||||||
File f = new File(s);
|
File f = new File(s);
|
||||||
if (f.canRead()) set.add(f.toURI().toURL());
|
if (f.canRead()) set.add(f.toURI().toURL());
|
||||||
|
|||||||
Reference in New Issue
Block a user