0

스프링 데이터 JPA, Neo4J 및 MongoDB를 사용하여 스프링 부트 애플리케이션을 설정하려고합니다. 목표는 교차 저장 엔티티를 사용하는 것뿐만 아니라 각 데이터 스토어의 여러 엔티티를 저장할 수 있도록하는 것입니다.스프링 부트로 다중 임베디드 데이터 스토어 사용하기

이 프로젝트는 개별적으로 각 점포 잘 작동하는 것 같다,하지만, JPA 엔티티를 저장하면이 예외를 발생 : 나는 모든 neo4J과 MongoDB를 관련 코드를 제거하면

org.springframework.dao.InvalidDataAccessApiUsageException: No EntityManager with actual transaction available for current thread - cannot reliably process 'persist' call; nested exception is javax.persistence.TransactionRequiredException: No EntityManager with actual transaction available for current thread - cannot reliably process 'persist' call 

이 예외가 발생하지 않습니다.

GitHub

답변

2

나는 그것이 this 프로젝트의 구성을 사용하여 작업 얻을 관리 : 여기

는 GitHub의에서 프로젝트에 대한 링크입니다.

@EnableJpaRepositories 주석에 "transactionManagerRef"속성을 추가하고 Transition Manager에 대해 좀 더 구성해야하고 일부 종속성을 수정 한 것처럼 보입니다.

+0

github 저장소가 업데이트되었습니다. – Raphael