Created
December 16, 2020 02:22
-
-
Save wnoizumi/f176a665dc3d43bf4f8483ce0b73e56f to your computer and use it in GitHub Desktop.
Exemplo de arquivo persistence.xml para projetos utilizando o JPA com HSQLDB em memória.
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
<?xml version="1.0" encoding="UTF-8"?> | |
<persistence version="2.0" | |
xmlns="http://java.sun.com/xml/ns/persistence" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" | |
xsi:schemaLocation="http://java.sun.com/xml/ns/persistence http://java.sun.com/xml/ns/persistence/persistence_2_0.xsd"> | |
<persistence-unit name="exemploPU" transaction-type="RESOURCE_LOCAL"> | |
<properties> | |
<property name="javax.persistence.jdbc.url" value="jdbc:hsqldb:mem:exemplo;shutdown=true;hsqldb.write_delay=false"/> | |
<property name="javax.persistence.jdbc.user" value="SA"/> | |
<property name="javax.persistence.jdbc.password" value=""/> | |
<property name="javax.persistence.jdbc.driver" value="org.hsqldb.jdbc.JDBCDriver"/> | |
<!-- validate | update | create | create-drop --> | |
<property name="hibernate.hbm2ddl.auto" value="update"/> | |
<property name="hibernate.show_sql" value="true"/> | |
<property name="hibernate.format_sql" value="true"/> | |
<property name="hibernate.dialect" value="org.hibernate.dialect.HSQLDialect"/> | |
</properties> | |
</persistence-unit> | |
</persistence> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment