Make it Better
传统jdbc写法
2016-9-24 StanWind

package pw.goyd.db;





import java.sql.Connection;


import java.sql.DriverManager;


import java.sql.ResultSet;


import java.sql.SQLException;


import java.sql.Statement;





import pw.goyd.game.constant.setting.ServerSetting;





/*


 
废弃了 用mybatis代替


  @author StanWind


 



 */


public class DBUtil implements ServerSetting {








// 获取数据库连接


public static Connection getConnection() {


Connection conn = null;


try {


Class.forName("com.mysql.jdbc.Driver");


conn = DriverManager.getConnection("jdbc:mysql://" + M_ADDR + ":"


发表评论:
昵称

邮件地址 (选填)

个人主页 (选填)

内容