Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <?xml version="1.0" encoding="UTF-8"?>
- <persistence version="2.1"
- xmlns="http://xmlns.jcp.org/xml/ns/persistence"
- xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
- xsi:schemaLocation="http://java.sun.com/xml/ns/persistence
- http://java.sun.com/xml/ns/persistence/persistence_2_1.xsd">
- <persistence-unit name="products-unit"
- transaction-type="RESOURCE_LOCAL">
- <!-- Per correttezza cambio il package uguale a quello che uso nel codice! -->
- <class>it.uniroma3.siw.products.Product</class>
- <properties>
- <property name="javax.persistence.jdbc.driver"
- value="org.postgresql.Driver" />
- <property name="javax.persistence.jdbc.user"
- value="postgres" />
- <property name="javax.persistence.jdbc.password"
- value="cristian" />
- <property name="javax.persistence.jdbc.url"
- value="jdbc:postgresql://localhost/products" />
- <!-- Hibernate properties -->
- <property name="hibernate.show_sql" value="true" />
- <property name="hibernate.format_sql" value="true" />
- <property name="hibernate.dialect"
- value="org.hibernate.dialect.PostgreSQLDialect" />
- <property name="hibernate.hbm2ddl.auto" value="create" />
- </properties>
- </persistence-unit>
- <persistence-unit name="products-unit-test" transaction-type="RESOURCE_LOCAL">
- <class>it.uniroma3.siw.products.Product</class>
- <properties>
- <property name="hibernate.show_sql" value="true" />
- <property name="hibernate.format_sql" value="true" />
- <property name="hibernate.hbm2ddl.auto" value="create" />
- <property name="javax.persistence.jdbc.driver"
- value="org.h2.Driver" />
- <property name="javax.persistence.jdbc.url"
- value="jdbc:h2:mem:test?MODE=PostgreSQL" />
- <property name="javax.persistence.jdbc.user" value="postgres" />
- <property name="javax.persistence.jdbc.password" value="cristian" />
- <property name="hibernate.dialect"
- value="org.hibernate.dialect.H2Dialect" />
- </properties>
- </persistence-unit>
- </persistence>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement