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