0% found this document useful (0 votes)
2 views1 page

Persistence XML

The document is a persistence configuration file for a Java application using Hibernate with a MySQL database. It defines a persistence unit named 'dev' with properties for database connection, including driver, URL, user, and password. Additionally, it includes Hibernate-specific properties for dialect, schema management, and SQL display options.

Uploaded by

Kumar S
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
2 views1 page

Persistence XML

The document is a persistence configuration file for a Java application using Hibernate with a MySQL database. It defines a persistence unit named 'dev' with properties for database connection, including driver, URL, user, and password. Additionally, it includes Hibernate-specific properties for dialect, schema management, and SQL display options.

Uploaded by

Kumar S
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
You are on page 1/ 1

<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="dev">
<provider>org.hibernate.jpa.HibernatePersistenceProvider</provider>
<properties>
<property name="javax.persistence.jdbc.driver" value="com.mysql.jdbc.Driver" />
<property name="javax.persistence.jdbc.url" value="jdbc:mysql://localhost:3306/jpademo?
createDatabaseIfNotExist=true" />
<property name="javax.persistence.jdbc.user" value="root" />
<property name="javax.persistence.jdbc.password" value="admin" />
<!-- Hibernate Properties -->
<property name="hibernate.dialect" value="org.hibernate.dialect.MySQL55Dialect" />
<property name="hibernate.hbm2ddl.auto" value="update" />
<property name="hibernate.show_sql" value="true" />
<property name="hibernate.format_sql" value="true" />
</properties>
</persistence-unit>
</persistence>

You might also like