1、点击 new Driver()
2、Attach Source
3、External … -> ok
4、源码实现
package com.mysql.jdbc;
import com.mysql.jdbc.NonRegisteringDriver;
import java.sql.DriverManager;
import java.sql.SQLException;
public class Driver extends NonRegisteringDriver implements java.sql.Driver {
public Driver() throws SQLException {
}
static {
try {
DriverManager.registerDriver(new Driver());
} catch (SQLException arg0) {
throw new RuntimeException("Can\'t register driver!");
}
}
}
5、Eclipse 安装反编译插件
https://www.jianshu.com/p/4402ee3ff1a8