Java.sql.Driver 接口是所有 JDBC 驱动程序需要实现的接口。这个接口是提供给数据库厂商使用的,
不同数据库厂商提供不同的实现
public Connection connection() throws Exception {
String driverClass = null;
String jdbcUrl = null;
String user = null;
String password = null;
//读取配置文件
InputStream in = getClass().getClassLoader().getResourceAsStream("jdbc.properties");
Properties properties = new Properties();
properties.load(in);
driverClass = properties.getProperty("driver");
jdbcUrl = properties.getProperty("url");
user = properties.getProperty("user");
password = properties.getProperty("password");
Properties info = new Properties();
info.put("user", user);
info.put("