import java.sql.Connection; import java.sql.DriverManager; import java.sql.SQLException; import java.util.Properties; public class PrestoExample { public static void main(String[] args) { String coordinatorUrl = "jdbc:presto://coordinator.example.com:8080"; String user = "username"; String password = "password"; Properties properties = new Properties(); properties.setProperty("user", user); properties.setProperty("password", password); try { Connection connection = DriverManager.getConnection(coordinatorUrl, properties); connection.close(); } catch (SQLException e) { e.printStackTrace(); } } }


上一篇:
下一篇:
切换中文