谁有JDBCUtils.java配置文件
谁有JDBCUtils.java配置文件
谁有JDBCUtils.java配置文件
2017-04-26
public class JDBCUtils { private static String url = "jdbc:mysql://localhost:3306/user"; private static String user = "root"; private static String passwd = "123456"; private static String driver = "com.mysql.jdbc.Driver"; public static ComboPooledDataSource getDataSource() throws Exception{ ComboPooledDataSource cpds = new ComboPooledDataSource(); cpds.setDriverClass( driver); cpds.setJdbcUrl( url ); cpds.setUser(user); cpds.setPassword(passwd); cpds.setMinPoolSize(5); cpds.setAcquireIncrement(5); cpds.setMaxPoolSize(30); cpds.setMaxIdleTime(60); return cpds; } }
举报