Forked from SergioDiniz/PostgreSQL JPA Hibernate persistence.xml
Created
July 30, 2021 15:49
-
-
Save frederick-greenacademy/8352a52a6f402690932faa2cc7aaf431 to your computer and use it in GitHub Desktop.
This file contains hidden or 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
<persistence xmlns="http://xmlns.jcp.org/xml/ns/persistence" | |
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" | |
xsi:schemaLocation="http://xmlns.jcp.org/xml/ns/persistence | |
http://xmlns.jcp.org/xml/ns/persistence/persistence_2_1.xsd" | |
version="2.1"> | |
<persistence-unit name="persistenceUnitName" transaction-type="RESOURCE_LOCAL"> | |
<properties> | |
<property name="javax.persistence.jdbc.driver" value="org.postgresql.Driver" /> <!-- DB Driver --> | |
<property name="javax.persistence.jdbc.url" value="jdbc:postgresql://localhost/dbName" /> <!-- BD Mane --> | |
<property name="javax.persistence.jdbc.user" value="postgres" /> <!-- DB User --> | |
<property name="javax.persistence.jdbc.password" value="12345" /> <!-- DB Password --> | |
<property name="hibernate.dialect" value="org.hibernate.dialect.PostgreSQLDialect"/> <!-- DB Dialect --> | |
<property name="hibernate.hbm2ddl.auto" value="update" /> <!-- create / create-drop / update --> | |
<property name="hibernate.show_sql" value="true" /> <!-- Show SQL in console --> | |
<property name="hibernate.format_sql" value="true" /> <!-- Show SQL formatted --> | |
</properties> | |
</persistence-unit> | |
</persistence> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment