package cn.sasa.demo1; import javax.sql.DataSource; import org.apache.commons.dbcp2.BasicDataSource; public class DBUtils { private static BasicDataSource datasource = new BasicDataSource(); ... Read More
posted @ 2019-01-18 14:23 SasaL Views(281) Comments(0) Diggs(0) Edit
package cn.sasa.demo1; import java.sql.Connection; import java.sql.SQLException; import java.util.List; import java.util.Map; import org.apache.commons.dbutils.QueryRunner; import org.apache.common... Read More
posted @ 2019-01-18 11:24 SasaL Views(563) Comments(0) Diggs(0) Edit
dbutils是apache封装了JDBC的工具类,比mysql-connector更方便些 下载地址:http://commons.apache.org/proper/commons-dbutils/download_dbutils.cgi database.properties: Read More
posted @ 2019-01-18 11:20 SasaL Views(627) Comments(0) Diggs(0) Edit