Commit f7be62b8 by Patryk Czarnik

sklep.properties

parent 9c2fecd6
......@@ -30,16 +30,16 @@ public class DBConnection implements AutoCloseable {
}
}
public static DBConnection openLocalhost() throws DBException {
try {
Connection c = DriverManager.getConnection("jdbc:postgresql://localhost/sklep", "alx", "abc123");
c.setAutoCommit(false);
return new DBConnection(c);
} catch (SQLException e) {
throw new DBException("Cannot connect to postgresql: " + e, e);
}
}
// public static DBConnection openLocalhost() throws DBException {
// try {
// Connection c = DriverManager.getConnection("jdbc:postgresql://localhost/sklep", "alx", "abc123");
// c.setAutoCommit(false);
// return new DBConnection(c);
// } catch (SQLException e) {
// throw new DBException("Cannot connect to postgresql: " + e, e);
// }
// }
//
@Override
public void close() {
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