1
resposta

persistence.xml

Temos o link para baixar o persistence.xml ???

1 resposta

segue conteúdo do persistence.xml:

<?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://xmlns.jcp.org/xml/ns/persistence http://xmlns.jcp.org/xml/ns/persistence/persistence_2_1.xsd">
    <persistence-unit name="tests" transaction-type="RESOURCE_LOCAL">
        <class>br.com.alura.leilao.model.Lance</class>
        <class>br.com.alura.leilao.model.Leilao</class>
        <class>br.com.alura.leilao.model.Usuario</class>
        <properties>
            <property name="javax.persistence.jdbc.driver" value="org.h2.Driver" />
            <property name="javax.persistence.jdbc.url" value="jdbc:h2:mem:leiloes_test" />
            <property name="javax.persistence.jdbc.user" value="sa" />
            <property name="javax.persistence.jdbc.password" value="" />

            <property name="javax.persistence.schema-generation.database.action" value="create-drop" />
        </properties>
    </persistence-unit>
</persistence>