摘要: java批处理sql 需要5.1.37及之后的驱动jar包 需要rewriteBatchedStatements=true import java.sql.Connection; import java.sql.DriverManager; import java.sql.PreparedState 阅读全文
posted @ 2022-03-08 23:16 CoderCatIce 阅读(125) 评论(0) 推荐(0) 编辑
摘要: 单例设计模式 懒汉式 /* * 单例设计模式:懒汉式 * */ public class SingleTonDemo02 { public static void main(String[] args) { Demo02 instance1 = Demo02.getInstance(); Demo0 阅读全文
posted @ 2022-03-08 20:09 CoderCatIce 阅读(19) 评论(0) 推荐(0) 编辑
摘要: 线程池的使用 public class PoolDemo { public static void main(String[] args) { // 使用Executors工具类创建固定大小的线程池 ThreadPoolExecutor executorService = (ThreadPoolEx 阅读全文
posted @ 2022-03-08 19:32 CoderCatIce 阅读(38) 评论(0) 推荐(0) 编辑
摘要: JDBC的各种连接方式 终极版 // 最终版 // 将配置写在配置文件中,用流读取 @Test public void finalTestConnection() throws Exception { // 读取配置文件 Properties properties = new Properties( 阅读全文
posted @ 2022-03-08 18:27 CoderCatIce 阅读(83) 评论(0) 推荐(0) 编辑