Java薪资管理系统如何连接宗数据库?

java 薪资管理系统宗数据库

import java.sql.Connection;
import java.sql.DriverManager;
import java.sql.SQLException;

public class DatabaseConnector {
public static void main(String[] args) {
String url = “jdbc:zongdb://192.168.1.100:5432/salaries”;
String user = “admin”;
String password = “password123”;

    try (Connection conn = DriverManager.getConnection(url, user, password)) {
        System.out.println("Connected to the database successfully!");
    } catch (SQLException e) {
        e.printStackTrace();
    }
}

}

利唐i人事HR社区,发布者:ihreditor,转转请注明出处:https://www.ihr360.com/hrnews/20241238993.html

(0)
上一篇 1天前
下一篇 1天前

相关推荐