code: public Connection getConnection() throws IOException {
  		Connection conn = null;
  		try {
  			if (this.datasource != null) {
  				try {
  					Class.forName(datasource.get("driver"));
  				} catch (ClassNotFoundException e) {
  					throw new IOException("Load jdbc driver fail: " + datasource.get("driver"));
  				}
  				String url = datasource.get("url");
  				String user = datasource.get("user");
  				String password = datasource.get("password");
  				if (StringUtils.isNoneBlank(user)) {
  					conn = DriverManager.getConnection(url, user, password);
  				} else {
  					conn = DriverManager.getConnection(url);
  				}
  				conn.setAutoCommit(datasource.getBoolean("auto_commit", true));
  			}
  		} catch (Exception e) {
  			throw new IOException(e);
  		}
  		return conn;
  	}
docs: 获取数据库连接
  
  @return 数据库连接
  
  @throws IOException 数据库连接异常