SHARE
TWEET

Untitled

a guest May 19th, 2019 56 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.     <persistence-unit name="tarefas">
  8.  
  9.         <!-- provedor/implementacao do JPA -->
  10.         <provider>org.hibernate.jpa.HibernatePersistenceProvider</provider>
  11.  
  12.         <!-- entidade mapeada -->
  13.         <class>rest.model.Tarefa</class>
  14.  
  15.         <properties>
  16.             <!-- dados da conexao -->
  17.             <property name="javax.persistence.jdbc.driver"
  18.                 value="org.postgresql.Driver" />
  19.             <property name="javax.persistence.jdbc.url"
  20.                 value="jdbc:postgresql://localhost:5432/projeto" />
  21.             <property name="javax.persistence.jdbc.user"
  22.                 value="postgres" />
  23.             <property name="javax.persistence.jdbc.password"
  24.                 value="postgres" />
  25.  
  26.             <!-- propriedades do hibernate -->
  27.             <property name="hibernate.dialect"
  28.                 value="org.hibernate.dialect.PostgreSQLDialect" />
  29.             <property name="hibernate.show_sql" value="true" />
  30.             <property name="hibernate.format_sql" value="true" />
  31.  
  32.             <!-- atualiza o banco, gera as tabelas se for preciso -->
  33.             <property name="hibernate.hbm2ddl.auto" value="update" />
  34.  
  35.         </properties>
  36.     </persistence-unit>
  37.    
  38. </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