“使用 commons-dbutils 中的 QueryRunner 测试添加数据”的版本间的差异
跳到导航
跳到搜索
Jihongchang(讨论 | 贡献) 小 (Jihongchang移动页面使用 Apache-DBUtils 中的 QueryRunner 测试添加数据至使用 commons-dbutils 中的 QueryRunner 测试添加数据) |
Jihongchang(讨论 | 贡献) |
||
第9行: | 第9行: | ||
**org.apache.commons.dbutils.ResultSetHandler | **org.apache.commons.dbutils.ResultSetHandler | ||
**工具类:org.apache.commons.dbutils.DbUtils | **工具类:org.apache.commons.dbutils.DbUtils | ||
+ | |||
+ | |||
+ | |||
+ | |||
+ | === pom.xml 引入类库 === | ||
+ | <syntaxhighlight lang="xml"> | ||
+ | <dependency> | ||
+ | <groupId>commons-dbutils</groupId> | ||
+ | <artifactId>commons-dbutils</artifactId> | ||
+ | <version>1.3</version> | ||
+ | </dependency> | ||
+ | |||
+ | </syntaxhighlight> |
2023年1月13日 (五) 12:36的版本
https://www.bilibili.com/video/BV1eJ411c7rf?p=51
Apache-DBUtils 简介
- commons-dbutils 是 Apache 组织提供的一个开源 JDBC 工具类库,它是对 JDBC 的简单封装,学习成本极低,并且使用 dbutils 能极大简化 jdbc 编码的工作量,同时也不会影响程序性能。
- API 介绍
- org.apache.commons.dbutils.QueryRunner
- org.apache.commons.dbutils.ResultSetHandler
- 工具类:org.apache.commons.dbutils.DbUtils
pom.xml 引入类库
<dependency>
<groupId>commons-dbutils</groupId>
<artifactId>commons-dbutils</artifactId>
<version>1.3</version>
</dependency>