Advertisement
sergAccount

Untitled

Apr 4th, 2021
880
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Java 0.67 KB | None | 0 0
  1. /*
  2.  * To change this license header, choose License Headers in Project Properties.
  3.  * To change this template file, choose Tools | Templates
  4.  * and open the template in the editor.
  5.  */
  6. package com.spec.util;
  7.  
  8. import java.sql.Connection;
  9. import java.sql.DriverManager;
  10. import java.sql.SQLException;
  11.  
  12. public class DataBaseUtil {
  13.    
  14.      public static Connection getConnection() throws SQLException {
  15.         Connection conn = DriverManager.getConnection("jdbc:postgresql://localhost:5432/postgres",
  16.                                                       "postgres",
  17.                                                       "postgres");
  18.         return conn;
  19.     }
  20.    
  21. }
  22.  
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement