java操作(dbcp.jar)
BasicDataSource basicDataSource=new BasicDataSource();
basicDataSource.setDriverClassName("org.gjt.mm.mysql.Driver");
basicDataSource.setUsername("root");
basicDataSource.setPassword("2014");
basicDataSource.setUrl("jdbc:mysql://localhost:3306/db?useOldAliasMetadataBehavior=true&useUnicode=true&characterEncoding=utf8&zeroDateTimeBehavior=convertToNull");
return (DataSource)basicDataSource;