Transaction

spring/study

[Spring] @Transactional 에 대해서 알아보자

Spring Framework의 @Transaction 소개 @Transactional 주석과 응용프로그램에서 트랜잭션을 관리하는 데 도움이 되는 방법에 대해 살펴보자. transation이란? 트랜잭션(transaction)은 컴퓨터 과학에서 하나의 작업 단위로 실행되는 연산의 집합이다. 트랜잭션은 데이터 일관성과 무결성을 보장하기 때문에 일반적으로 데이터베이스 작업 시 사용ㄷ뇌다.. 트랜잭션을 통해 작업 그룹을 단일 엔터티로 성공 또는 실패하도록 만들 수 있다. 트랜잭션은 일반적으로 ACID(원자성, 일관성, 격리 및 내구성)라는 네 가지 속성으로 구성되는데, 이러한 속성은 트랜잭션이 올바르게 완료되고 데이터가 일관되도록 하는 데 사용된다. @Transactional이란? @Transactional ..

spring/error

[에러 해결] No EntityManager with actual transaction available for current thread - cannot reliably process 'persist' call

문제 처음 JPA 학습을 시작할 때 Entity 작성 -> Repository 작성 -> test 작성 순으로 코드를 작성하다보면 test 작성에서 다음과 같은 에러를 마주칠 때가 있다. 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 fo..

얼킴
'Transaction' 태그의 글 목록