之前我是写了一个jdbc.properties:
然后建立了一个工具类用来获取连接并返回连接,已经资源关闭的操作DBUtils:
public static Connection getConnection() throws Exception {
InputStream inputStream = ClassLoader.getSystemClassLoader().getResourceAsStream("jdbc.properties");
Properties properties = new Properties()</