Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- static void cleanUpPipeline() {
- String jdbcUrl = String.format(
- "jdbc:postgresql://google/%s?cloudSqlInstance=%s"
- + "&socketFactory=com.google.cloud.sql.postgres.SocketFactory",
- "xxxxxx",
- "xxxxxx");
- try {
- Class.forName("org.postgresql.Driver");
- Connection connection = DriverManager.getConnection(jdbcUrl, "xxxxxx", "xxxxxx");
- } catch (SQLException | ClassNotFoundException e) {
- e.printStackTrace();
- }
- }
- <dependency>
- <groupId>com.google.cloud.sql</groupId>
- <artifactId>postgres-socket-factory</artifactId>
- <version>1.0.11</version>
- </dependency>
- <dependency>
- <groupId>org.postgresql</groupId>
- <artifactId>postgresql</artifactId>
- <version>42.2.5</version>
- </dependency>
Add Comment
Please, Sign In to add comment