介绍
- java.sql.DriverManager
- public class DriverManager
- 驱动管理器
- 根据 API 编写的程序都可以与驱动管理器进行通信,而驱动管理器则通过驱动程序与实际的数据库进行通信
API
static
-
getConnection
Connection
-
getLogWriter, setLogWriter
-
getLoginTimeout, setLoginTimeout
-
println
- 输出日志
-
getDriver
-
getDrivers
-
registerDriver
-
drivers
-
deregisterDriver
代码示例
DriverManager.setLogWriter(new PrintWriter(System.err));
DriverManager.drivers().forEach(System.out::println);
标签:DriverManager,管理器,System,20230628,sql,java
From: https://www.cnblogs.com/huangwenjie/p/17650425.html