JpaConfiguration.java
522 Bytes
package org.legrog.configuration;
import javax.enterprise.context.RequestScoped;
import javax.enterprise.inject.Produces;
import javax.persistence.EntityManager;
import javax.persistence.PersistenceContext;
/**
* Classe de configutation JPA, utilisée par tous les JpaRepository.
*/
public class JpaConfiguration {
@Produces
@RequestScoped
@PersistenceContext(unitName = "development-pu")
/**
* Interface injectable de gestion de la persistence
*/
public EntityManager entityManager;
}