SHARE
TWEET

persistence.xml

a guest Sep 10th, 2019 137 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. <persistence xmlns="http://java.sun.com/xml/ns/persistence"
  2.    xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
  3.    xsi:schemaLocation="http://java.sun.com/xml/ns/persistence
  4.        http://java.sun.com/xml/ns/persistence/persistence_2_0.xsd"
  5.    version="2.0">
  6.  
  7.    <!-- unidade de persistencia com o nome financas -->
  8.    <persistence-unit name="financas">
  9.       <!-- Implementação do JPA, no nosso caso Hibernate -->
  10.       <provider>org.hibernate.jpa.HibernatePersistenceProvider</provider>
  11.  
  12.       <!-- Aqui são listadas todas as entidades -->
  13.       <class>br.edu.unoesc.financas.modelo.Conta</class>
  14.  
  15.       <properties>    
  16.         <!-- Propriedades JDBC -->
  17.         <property name="javax.persistence.jdbc.driver" value="com.mysql.jdbc.Driver" />
  18.         <property name="javax.persistence.jdbc.url" value="jdbc:mysql://localhost/financas?createDatabaseIfNotExist=true&amp;useTimezone=true;useSSL=false" />
  19.      <property name="javax.persistence.jdbc.user" value="root" />
  20.         <property name="javax.persistence.jdbc.password" value="" />
  21.  
  22.         <!-- Configurações específicas do Hibernate -->
  23.         <property name="hibernate.dialect" value="org.hibernate.dialect.MySQL5InnoDBDialect" />
  24.         <property name="hibernate.hbm2ddl.auto" value="update" />
  25.         <property name="hibernate.show_sql" value="true" />
  26.         <property name="hibernate.format_sql" value="true" />
  27.       </properties>
  28.    </persistence-unit>
  29. </persistence>
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand
 
Top