Fork me on GitHub
摘要: 1.所需的jar包 https://mvnrepository.com/artifact/commons-dbutils/commons-dbutils 2.重点类/接口 QueryRunner: 实现增删查改操作 ResultSetHandler:接口;实现类返回结果/结果类型 3.增删查改 /* 阅读全文
posted @ 2020-06-17 11:37 亲爸爸 阅读(425) 评论(1) 推荐(0) 编辑
摘要: public class TransactionsUtil { //创建线程 private static ThreadLocal<Connection> threadLocal = new ThreadLocal<>(); //获取连接 public static Connection getCo 阅读全文
posted @ 2020-06-17 11:19 亲爸爸 阅读(221) 评论(0) 推荐(0) 编辑
摘要: 1.所需要的jar包 https://mvnrepository.com/artifact/com.mchange/c3p0 https://mvnrepository.com/artifact/com.mchange/mchange-commons-java/0.2.15 2.配置c3p0-con 阅读全文
posted @ 2020-06-17 11:16 亲爸爸 阅读(1219) 评论(0) 推荐(0) 编辑