Browse Source

1

pull/6/head
zack 3 years ago
parent
commit
e79e8f895e
  1. 4
      src/main/java/com/fr/demo/NewReadFrmFromDatabase.java

4
src/main/java/com/fr/demo/NewReadFrmFromDatabase.java

@ -56,9 +56,9 @@ public class NewReadFrmFromDatabase extends DBFormlet {
private static Connection getConnection() throws ClassNotFoundException, SQLException { private static Connection getConnection() throws ClassNotFoundException, SQLException {
// 定义数据连接(根据你实际数据库信息进行修改) // 定义数据连接(根据你实际数据库信息进行修改)
String driver = "com.mysql.jdbc.Driver"; String driver = "com.mysql.jdbc.Driver";
String url = "jdbc:mysql://localhost:3306/frtest"; String url = "jdbc:mysql://localhost:3306/test";
String user = "root"; String user = "root";
String pass = "root"; String pass = "123456";
Class.forName(driver); Class.forName(driver);
Connection conn = DriverManager.getConnection(url, user, pass); Connection conn = DriverManager.getConnection(url, user, pass);
return conn; return conn;

Loading…
Cancel
Save