# MVDB-driver **Repository Path**: tp16b/MVDB-driver ## Basic Information - **Project Name**: MVDB-driver - **Description**: 一个可支持连接多个版本数据库的连接驱动工具(可避免类覆盖问题) - **Primary Language**: Java - **License**: MIT - **Default Branch**: master - **Homepage**: None - **GVP Project**: No ## Statistics - **Stars**: 1 - **Forks**: 0 - **Created**: 2024-01-09 - **Last Updated**: 2025-05-29 ## Categories & Tags **Categories**: Uncategorized **Tags**: None ## README # 数据库多版本连接驱动工具 一个可支持同时连接数据库多个版本的连接驱动,可避免类覆盖问题。 ##### 已支持的数据库: | 关系型 | 非关系型 | |:------:|:------:| | Mysql | MongoDB | | Oracle | | | Postgresql | | | DaMeng | | | Sqlserver | | ## Feature - 支持多个版本数据库连接与sql执行(支持版本可配置) - 自动探测数据库版本(支持自定义实现探测) ## 开始使用 **示例:** ```java DbConfigInfo dbConfigInfo = DbConfigInfo.builder() .connectionAddress("xxx") .port(3306) .username("mysql-test") .password("xxx") .build(); DbExecuteReq executeReq = DbExecuteReq.builder().dbConfigInfo(dbConfigInfo).commandList(List.of("select 1")).build(); // 1.创建连接Client var client = new RoutingClient(executeReq.getDbConfigInfo()); // 2.执行Sql命令 List execute = client.execute(executeReq.getCommandList()); // 3.拿到执行结果 DbExecuteResp executeResp = DbExecuteResp.builder().results(execute).build(); ``` #### 依赖环境 - JDK21 - maven ## 技术方案 **一句话:使用自定义类加载器加载不同版本的数据库连接驱动** 技术详细可参考: [一个支持多版本数据库连接的网络客户端]()