Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- public ProductRepositorySql() {
- Properties properties = new Properties();
- String url = "jdbc:postgresql://gegevensbanken.khleuven.be:51516/2TX33";
- properties.setProperty("user", "r0623506");
- properties.setProperty("password", "");
- properties.setProperty("ssl", "true");
- properties.setProperty("sslfactory", "org.postgresql.ssl.NonValidatingFactory");
- Connection connection;
- try {
- Class.forName("org.postgresql.Driver");
- connection = DriverManager.getConnection(url, properties);
- statement = connection.createStatement();
- } catch (SQLException e) {
- throw new DbException(e.getMessage(), e);
- } catch (ClassNotFoundException e) {
- throw new DbException(e.getMessage(), e);
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement