Advertisement
Guest User

Untitled

a guest
May 15th, 2016
90
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
XML 1.37 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.     <persistence-unit name="persistenceUnit1">
  7.         <properties>
  8.             <property name="hibernate.archive.autodetection" value="class" />
  9.             <!-- <property name="hibernate.show_sql" value="true" /> -->
  10.             <property name="hibernate.format_sql" value="true" />
  11.  
  12.             <!-- Configuration de la  BDD -->
  13.             <property name="javax.persistence.jdbc.driver" value="com.mysql.jdbc.Driver" />
  14.             <property name="javax.persistence.jdbc.url" value="jdbc:mysql://localhost/tpjpa" />
  15.             <property name="javax.persistence.jdbc.user" value="root" />
  16.             <property name="javax.persistence.jdbc.password" value="123456" />
  17.  
  18.             <!-- Spécifie le 'dialecte' SQL utilisé pour communiquer avec la BDD -->
  19.             <property name="hibernate.dialect" value="org.hibernate.dialect.MySQLDialect" />
  20.  
  21.             <!-- Indique a Hibernate de (re-)créer la BDD au lancement de l'application -->
  22.             <property name="hibernate.hbm2ddl.auto" value="create" />
  23.         </properties>
  24.  
  25.     </persistence-unit>
  26. </persistence>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement