|
|
|
@ -1,16 +1,26 @@
|
|
|
|
|
package com.dsideal.resource.Test;
|
|
|
|
|
|
|
|
|
|
import com.dsideal.resource.Base.Model.BaseModel;
|
|
|
|
|
import com.dsideal.resource.Plugin.YamlProp;
|
|
|
|
|
import com.dsideal.resource.ResApplication;
|
|
|
|
|
import com.dsideal.resource.Util.RetKit;
|
|
|
|
|
import com.fasterxml.jackson.core.JsonProcessingException;
|
|
|
|
|
import com.fasterxml.jackson.databind.ObjectMapper;
|
|
|
|
|
import com.fasterxml.jackson.databind.SerializationFeature;
|
|
|
|
|
import com.fasterxml.jackson.databind.ObjectMapper;
|
|
|
|
|
import com.fasterxml.jackson.datatype.jsr310.JavaTimeModule;
|
|
|
|
|
import com.jfinal.kit.Prop;
|
|
|
|
|
import com.jfinal.plugin.activerecord.ActiveRecordPlugin;
|
|
|
|
|
import com.jfinal.plugin.activerecord.dialect.MysqlDialect;
|
|
|
|
|
import com.jfinal.plugin.hikaricp.HikariCpPlugin;
|
|
|
|
|
import com.jfinal.plugin.activerecord.Record;
|
|
|
|
|
|
|
|
|
|
import java.io.File;
|
|
|
|
|
import java.util.List;
|
|
|
|
|
import java.util.Map;
|
|
|
|
|
|
|
|
|
|
public class testDb {
|
|
|
|
|
public static void main(String[] args) {
|
|
|
|
|
public static void main(String[] args) throws JsonProcessingException {
|
|
|
|
|
//加载配置文件
|
|
|
|
|
String configFile = "application_dev.yaml";
|
|
|
|
|
Prop PropKit = new YamlProp(configFile);
|
|
|
|
@ -35,6 +45,16 @@ public class testDb {
|
|
|
|
|
}
|
|
|
|
|
masterArp.start();
|
|
|
|
|
|
|
|
|
|
BaseModel bm = new BaseModel();
|
|
|
|
|
List<Record> list = bm.fetchStructure(1, -1);
|
|
|
|
|
System.out.println(list);
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
Map<String, Object> map = RetKit.renderSuccess("成功", list, null, 1, 99999, list.size());
|
|
|
|
|
ObjectMapper mapper = new ObjectMapper();
|
|
|
|
|
mapper.registerModule(new JavaTimeModule()); // 注册 JavaTimeModule
|
|
|
|
|
mapper.enable(SerializationFeature.INDENT_OUTPUT); // 启用美化输出
|
|
|
|
|
String jsonString = mapper.writeValueAsString(map);
|
|
|
|
|
System.out.println(jsonString);
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|