Skip to content

Commit 6c0ce45

Browse files
galilevgalilevchayim
authored
Added postgres driver to pom.xml and hibernate config file for postgres (#74)
* added postgres driver to pom.xml and hibernate config file for postgres * #PR 74 - fix the spacing * PR #74 - fixed spacing Co-authored-by: galilev <[email protected]> Co-authored-by: Chayim <[email protected]>
1 parent cf3143d commit 6c0ce45

File tree

2 files changed

+33
-0
lines changed

2 files changed

+33
-0
lines changed

pom.xml

+5
Original file line numberDiff line numberDiff line change
@@ -63,6 +63,11 @@
6363
<version>8.0.20</version>
6464
<scope>test</scope>
6565
</dependency>
66+
<dependency>
67+
<groupId>org.postgresql</groupId>
68+
<artifactId>postgresql</artifactId>
69+
<version>42.4.0</version>
70+
</dependency>
6671
<dependency>
6772
<groupId>org.hibernate</groupId>
6873
<artifactId>hibernate-core</artifactId>
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,28 @@
1+
<!DOCTYPE hibernate-configuration PUBLIC
2+
"-//Hibernate/Hibernate Configuration DTD 3.0//EN"
3+
"http://www.hibernate.org/dtd/hibernate-configuration-3.0.dtd">
4+
5+
<hibernate-configuration>
6+
<session-factory>
7+
<!-- JDBC Database connection settings -->
8+
<property name="connection.driver_class">org.postgresql.Driver</property>
9+
<property name="connection.url">jdbc:postgresql://localhost:5432/postgres/allowPublicKeyRetrieval=true&amp;useSSL=false</property>
10+
<property name="connection.username">postgres</property>
11+
<property name="connection.password">postgres</property>
12+
<property name="hibernate.dialect">org.hibernate.dialect.PostgreSQLDialect</property>
13+
<!-- JDBC connection pool settings ... using built-in test pool -->
14+
<property name="connection.pool_size">1</property>
15+
<!-- Echo the SQL to stdout -->
16+
<property name="show_sql">false</property>
17+
<!-- Set the current session context -->
18+
<property name="current_session_context_class">thread</property>
19+
<!-- Drop and re-create the database schema on startup -->
20+
<property name="hbm2ddl.auto">update</property>
21+
<!-- dbcp connection pool configuration -->
22+
<property name="hibernate.dbcp.initialSize">5</property>
23+
<property name="hibernate.dbcp.maxTotal">20</property>
24+
<property name="hibernate.dbcp.maxIdle">10</property>
25+
<property name="hibernate.dbcp.minIdle">5</property>
26+
<property name="hibernate.dbcp.maxWaitMillis">-1</property>
27+
</session-factory>
28+
</hibernate-configuration>

0 commit comments

Comments
 (0)