mirror of
https://github.com/Geniusay/ChopperBot.git
synced 2026-05-23 04:39:41 +08:00
技术文档
This commit is contained in:
1
FileModule/README.md
Normal file
1
FileModule/README.md
Normal file
@@ -0,0 +1 @@
|
||||
# FileModule
|
||||
@@ -117,6 +117,7 @@ public class FileCacheTest {
|
||||
@Test
|
||||
public void TestAddCache() throws FileCacheException, InterruptedException {
|
||||
FileCacheManagerInstance.getInstance().start();
|
||||
|
||||
for(int i=0;i<10;i++){
|
||||
Student student = new Student(Integer.toString(i),i,"jsu"+i,"major"+i,null,null);
|
||||
cache.writeKeys(student,"-1");
|
||||
|
||||
@@ -58,7 +58,7 @@ public class JsonFileUtilTest {
|
||||
|
||||
@Test
|
||||
public void readJsonFile() {
|
||||
Map maps = JsonFileUtil.readJsonFile("E:\\Project\\ChopperBot\\FileModule\\src\\main\\resources\\", "test.json");
|
||||
Map maps = JsonFileUtil.readJsonFile("../config/", "moduleConfig.json");
|
||||
Object test = maps.get("module");
|
||||
System.out.println(test);
|
||||
System.out.println(maps);
|
||||
|
||||
65
FileModule/src/test/java/org/example/util/test.json
Normal file
65
FileModule/src/test/java/org/example/util/test.json
Normal file
@@ -0,0 +1,65 @@
|
||||
{
|
||||
"data":[
|
||||
{
|
||||
"age":0,
|
||||
"major":"major0",
|
||||
"name":"0",
|
||||
"school":"jsu0"
|
||||
},
|
||||
{
|
||||
"age":1,
|
||||
"major":"major1",
|
||||
"name":"1",
|
||||
"school":"jsu1"
|
||||
},
|
||||
{
|
||||
"age":2,
|
||||
"major":"major2",
|
||||
"name":"2",
|
||||
"school":"jsu2"
|
||||
},
|
||||
{
|
||||
"age":3,
|
||||
"major":"major3",
|
||||
"name":"3",
|
||||
"school":"jsu3"
|
||||
},
|
||||
{
|
||||
"age":4,
|
||||
"major":"major4",
|
||||
"name":"4",
|
||||
"school":"jsu4"
|
||||
},
|
||||
{
|
||||
"age":5,
|
||||
"major":"major5",
|
||||
"name":"5",
|
||||
"school":"jsu5"
|
||||
},
|
||||
{
|
||||
"age":6,
|
||||
"major":"major6",
|
||||
"name":"6",
|
||||
"school":"jsu6"
|
||||
},
|
||||
{
|
||||
"age":7,
|
||||
"major":"major7",
|
||||
"name":"7",
|
||||
"school":"jsu7"
|
||||
},
|
||||
{
|
||||
"age":8,
|
||||
"major":"major8",
|
||||
"name":"8",
|
||||
"school":"jsu8"
|
||||
},
|
||||
{
|
||||
"age":9,
|
||||
"major":"major9",
|
||||
"name":"9",
|
||||
"school":"jsu9"
|
||||
}
|
||||
],
|
||||
"updateTime":"2023-04-26 00:24:47"
|
||||
}
|
||||
Binary file not shown.
Reference in New Issue
Block a user