Advertisement
Guest User

Untitled

a guest
Jan 25th, 2018
85
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
XML 1.42 KB | None | 0 0
  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.  
  10.         <!-- Implementação do JPA, no nosso caso Hibernate -->
  11.         <provider>org.hibernate.jpa.HibernatePersistenceProvider</provider>
  12.  
  13.         <!-- Aqui são listadas todas as entidades -->
  14.         <class>br.com.caelum.financas.modelo.Conta</class>
  15.         <class>br.com.caelum.financas.modelo.Categoria</class>
  16.         <class>br.com.caelum.financas.modelo.Movimentacao</class>
  17.  
  18.         <properties>
  19.  
  20.             <!-- Propriedades JDBC -->
  21.             <property name="javax.persistence.jdbc.driver" value="com.mysql.jdbc.Driver" />
  22.             <property name="javax.persistence.jdbc.url" value="jdbc:mysql://localhost/financas" />
  23.             <property name="javax.persistence.jdbc.user" value="root" />
  24.             <property name="javax.persistence.jdbc.password" value="root" />
  25.  
  26.             <!-- Configurações específicas do Hibernate -->
  27.             <property name="hibernate.dialect" value="org.hibernate.dialect.MySQL5InnoDBDialect" />
  28.             <property name="hibernate.hbm2ddl.auto" value="update" />
  29.             <property name="hibernate.show_sql" value="true" />
  30.             <property name="hibernate.format_sql" value="true" />
  31.         </properties>
  32.     </persistence-unit>
  33.  
  34. </persistence>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement