This commit is contained in:
麒麟
2023-09-11 23:16:00 +08:00
parent 295e1771ab
commit 595e1a8c20
6 changed files with 42 additions and 47 deletions

View File

@@ -16,11 +16,11 @@ import java.util.Map;
public class DBUtil {
// 四大金刚
String dname = Utils.getPeoperties("dbname")+"";
String dname = Utils.getPeoperties("dbname");
String driver = "com.mysql.jdbc.Driver";// 驱动名称
String url = "jdbc:mysql://"+Utils.getPeoperties("dburl")+":"+Utils.getPeoperties("dbport")+"/"+dname+"?useUnicode=false&characterEncoding=UTF-8&useOldAliasMetadataBehavior=true&autoReconnect=true&useSSL=false";// 连接
String username = Utils.getPeoperties("dbusername")+"";// 用户名
String password = Utils.getPeoperties("dbpassword")+"";// 密码
String username = Utils.getPeoperties("dbusername");// 用户名
String password = Utils.getPeoperties("dbpassword");// 密码
// 三剑客
Connection con = null;// 连接对象