Skip to content

Instantly share code, notes, and snippets.

@JorisNienkemper
Created June 12, 2018 08:02
Show Gist options
  • Save JorisNienkemper/7470263cbaf94ef368b32782679bc5fe to your computer and use it in GitHub Desktop.
Save JorisNienkemper/7470263cbaf94ef368b32782679bc5fe to your computer and use it in GitHub Desktop.
<?xml version="1.0" encoding="UTF-8"?>
<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="pu-name" transaction-type="RESOURCE_LOCAL">
<!-- details of persistence unit -->
</persistence-unit>
</persistence>
<!-- persistence unit configuration for mysql 5.7 hibernate 5.3 -->
<persistence-unit name="mysql5-hibernate5-pu" transaction-type="RESOURCE_LOCAL">
<class>jpademo.Cursist</class>
<properties>
<property name="hibernate.archive.autodetection" value="class" />
<property name="hibernate.dialect" value="org.hibernate.dialect.MySQL5InnoDBDialect" />
<property name="hibernate.connection.driver_class" value="com.mysql.jdbc.Driver" />
<property name="hibernate.connection.url" value="jdbc:mysql://localhost/cursistendb" />
<property name="hibernate.connection.username" value="root" />
<property name="hibernate.connection.password" value="" />
<property name="hibernate.show_sql" value="true"/>
<property name="hibernate.hbm2ddl.auto" value="create" />
</properties>
</persistence-unit>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment