SpringBoot_JPA_DeleteMapping 오류 - No EntityManager with actual transaction available for current thread - cannot reliably process 'remove' call

Youn YeoJin·2021년 11월 29일
0

SpringBoot-JPA 활용 CRUD 중 DeleteMapping, Postman 실행 시 나타난 오류이다.

No EntityManager with actual transaction available for current thread - cannot reliably process 'remove' call

현재 스레드에서 사용할 수 있는 트랜잭션이 포함된 EntityManager가 없어 '제거' 호출을 안정적으로 처리 할 수 없다는 뜻이다.

구글링을 해보니 delete 메소드에 @Transactional 어노테이션을 붙여줘야 한다고 한다.

아래는 이전에 주었던 레파지토리

다음은 변경된 레파지토리

변경 전 Postman

변경 후 Postman

profile
비전공자의 오류해결 성장기

0개의 댓글