时间:2021-07-01 10:21:17 帮助过:49人阅读
项目做的多了,连最基本的链接数据库的方式都忘记了。今天记录以便以后查看 oracle/mysql Class.forName(oracle.jdbc.driver.OracleDriver/com.mysql.jdbc.Driver); Connection connoracl = DriverManager.getConnection(jdbc:oracle:thin:@192.168.1.252:15
项目做的多了,连最基本的链接数据库的方式都忘记了。今天记录以便以后查看
oracle/mysql
Class.forName("oracle.jdbc.driver.OracleDriver"/com.mysql.jdbc.Driver);
Connection connoracl = DriverManager.getConnection("jdbc:oracle:thin:@192.168.1.252:1521:orcl"/jdbc:mysql://192.168.1.252:3306/ecmsdb?useUnicode=true&characterEncoding=UTF-8&zeroDateTimeBehavior=convertToNull, "username", "password");