Created
November 18, 2016 21:58
-
-
Save SergioDiniz/6ccd279db7cacac021ab01624fdf8278 to your computer and use it in GitHub Desktop.
hibernate.cfg.xml for PostgreSQL
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<!-- | |
~ Hibernate, Relational Persistence for Idiomatic Java | |
~ | |
~ License: GNU Lesser General Public License (LGPL), version 2.1 or later. | |
~ See the lgpl.txt file in the root directory or <http://www.gnu.org/licenses/lgpl-2.1.html>. | |
--> | |
<!DOCTYPE hibernate-configuration PUBLIC | |
"-//Hibernate/Hibernate Configuration DTD 3.0//EN" | |
"http://www.hibernate.org/dtd/hibernate-configuration-3.0.dtd"> | |
<hibernate-configuration> | |
<session-factory> | |
<property name="connection.url">jdbc:postgresql://localhost/myDBName</property> <!-- BD Mane --> | |
<property name="connection.driver_class">org.postgresql.Driver</property> <!-- DB Driver --> | |
<property name="connection.username">postgres</property> <!-- DB User --> | |
<property name="connection.password">12345</property> <!-- DB Password --> | |
<property name="dialect">org.hibernate.dialect.PostgreSQLDialect</property> <!-- DB Dialect --> | |
<property name="hbm2ddl.auto">update</property> <!-- create / create-drop / update --> | |
<property name="show_sql">true</property> <!-- Show SQL in console --> | |
<property name="format_sql">true</property> <!-- Show SQL formatted --> | |
<mapping class="beans.Task"/> | |
</session-factory> | |
</hibernate-configuration> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Thanks for you