use of com.jfinal.plugin.activerecord.dialect.Dialect in project my_curd by qinyou.
the class SchemaInfoUtil method main.
public static void main(String[] args) {
// 注意 InformationSchema=true
DruidPlugin dp = new DruidPlugin("jdbc:mysql://127.0.0.1/my_curd?characterEncoding=utf8&zeroDateTimeBehavior=convertToNull&useInformationSchema=true", "root", "123456");
dp.start();
Dialect mysqlDialect = new MysqlDialect();
SchemaInfoUtil util = new SchemaInfoUtil(mysqlDialect, dp.getDataSource());
List<Table> tables = util.getAllTableInfo(true);
DbKit.getConfig().getDialect();
DbKit.getConfig().getDataSource();
System.out.println(JsonKit.toJson(tables));
}
Aggregations