Commit f7be62b8 by Patryk Czarnik

sklep.properties

parent 9c2fecd6
...@@ -30,16 +30,16 @@ public class DBConnection implements AutoCloseable { ...@@ -30,16 +30,16 @@ public class DBConnection implements AutoCloseable {
} }
} }
public static DBConnection openLocalhost() throws DBException { // public static DBConnection openLocalhost() throws DBException {
try { // try {
Connection c = DriverManager.getConnection("jdbc:postgresql://localhost/sklep", "alx", "abc123"); // Connection c = DriverManager.getConnection("jdbc:postgresql://localhost/sklep", "alx", "abc123");
c.setAutoCommit(false); // c.setAutoCommit(false);
return new DBConnection(c); // return new DBConnection(c);
} catch (SQLException e) { // } catch (SQLException e) {
throw new DBException("Cannot connect to postgresql: " + e, e); // throw new DBException("Cannot connect to postgresql: " + e, e);
} // }
} // }
//
@Override @Override
public void close() { public void close() {
try { try {
......
url=jdbc:postgresql://localhost:5432/sklep
driver_class=org.postgresql.Driver
user=alx
password=abc123
photo_dir=/home/patryk/sklep/foto
# Sciezki na Windows: albo piszemy slashe / , albo podwojne backslashe \\
# photo_dir=C:/Users/Patryk/Desktop/sklep/foto
# photo_dir=C:\\Users\\Patryk\\Desktop\\sklep\\foto
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment