📜  找不到适合 jdbc:mysql 的驱动程序 - Java 代码示例

📅  最后修改于: 2022-03-11 14:52:22.405000             🧑  作者: Mango

代码示例1
Connection con = null;
try {
    //registering the jdbc driver here, your string to use 
    //here depends on what driver you are using.
    Class.forName("something.jdbc.driver.YourFubarDriver");   
    con = DriverManager.getConnection("jdbc:apache:commons:dbcp:test");
} catch (SQLException e) {
    throw new RuntimeException(e);
}