mirror of
https://github.com/Geniusay/ChopperBot.git
synced 2026-05-23 04:39:41 +08:00
1,完成模块启动架构搭建
2,完成hotModule模块配置文件创建 3,模块启动日志完成
This commit is contained in:
@@ -1,5 +1,6 @@
|
||||
package org.example.cache;
|
||||
|
||||
import org.example.log.FileModuleLogger;
|
||||
import org.example.util.TimeUtil;
|
||||
import org.slf4j.Logger;
|
||||
import org.slf4j.LoggerFactory;
|
||||
@@ -75,6 +76,7 @@ public class FileCacheManager {
|
||||
fileCaches.add(fileCache);
|
||||
fileCacheMap.put(fileCache.getFullFilePath(),fileCache);
|
||||
initSleepTime();
|
||||
FileModuleLogger.logger.info("FileCacheManager add a new FileCache:{}",fileCache.getFullFilePath());
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
@@ -6,7 +6,7 @@ import org.example.cache.FileCacheManagerInstance;
|
||||
* @author Genius
|
||||
* @date 2023/04/26 02:09
|
||||
**/
|
||||
public class FileCacheManagerInit implements InitMachine{
|
||||
public class FileCacheManagerInit extends CommonInitMachine{
|
||||
|
||||
@Override
|
||||
public boolean init() {
|
||||
|
||||
@@ -15,7 +15,7 @@ import java.util.Map;
|
||||
* @date 2023/04/20 18:34
|
||||
**/
|
||||
|
||||
public class ModuleSrcConfigFileInit implements InitMachine {
|
||||
public class ModuleSrcConfigFileInit extends CommonInitMachine {
|
||||
|
||||
private Logger logger = LoggerFactory.getLogger(ModuleSrcConfigFileInit.class);
|
||||
|
||||
|
||||
@@ -61,7 +61,6 @@ public class FileCacheTest {
|
||||
FileCacheManager manager = new FileCacheManager(List.of(fileCache));
|
||||
manager.start();
|
||||
|
||||
System.out.println(fileCache.get("barrage","src"));
|
||||
fileCache.append(1,"barrage","src");
|
||||
}
|
||||
|
||||
@@ -109,7 +108,6 @@ public class FileCacheTest {
|
||||
FileCacheManager manager = new FileCacheManager(List.of(fileCache));
|
||||
manager.start();
|
||||
|
||||
System.out.println(manager.addFileCache(fileCache));
|
||||
}
|
||||
|
||||
@Test
|
||||
|
||||
Reference in New Issue
Block a user