Notice
Recent Posts
Recent Comments
Link
일 | 월 | 화 | 수 | 목 | 금 | 토 |
---|---|---|---|---|---|---|
1 | 2 | 3 | 4 | 5 | ||
6 | 7 | 8 | 9 | 10 | 11 | 12 |
13 | 14 | 15 | 16 | 17 | 18 | 19 |
20 | 21 | 22 | 23 | 24 | 25 | 26 |
27 | 28 | 29 | 30 |
Tags
- @Builder @NoArgsConstructor
- spring mapper
- vueslot
- 도커 logs
- JpaRepository update
- spring JPA DB Connection
- vuecomponent
- spring @mapper
- 도커 컨테이너 로그
- Transactions Propagation Option
- spring DB Connection
- CrudRepository update
- Data Annotation
- Vue
- doker logs tail
- 도커 로그 확인
- spring repository
- JPA DB 다중 Connection
- spring mapper annotation
- NoArgsConstructor
- Spring
- docker 로그
- JPA DB Connection 다중
- JAVA Exception 종류
- AllArgsConstructor
- Spring JPA Specification
- repository annotation
- 자바버그수정
- mapper annotationo
- spring JPA DB multi Connection
Archives
- Today
- Total
개발을 잘하고 싶은 개발자
[Spring] Transactions Propagation Option with Spring JPA 본문
출처 https://www.baeldung.com/transaction-configuration-with-jpa-and-spring
https://taetaetae.github.io/2016/10/08/20161008/
propagation ( 전파옵션)
- REQUIRED : 부모 트랜잭션 내에서 실행하며 부모 트랜잭션이 없을 경우 새로운 트랜잭션을 생성
- REQUIRES_NEW : 부모 트랜잭션을 무시하고 무조건 새로운 트랜잭션이 생성
- SUPPORT : 부모 트랜잭션 내에서 실행하며 부모 트랜잭션이 없을 경우 nontransactionally로 실행
- MANDATORY : 부모 트랜잭션 내에서 실행되며 부모 트랜잭션이 없을 경우 예외가 발생
- NOT_SUPPORT : nontransactionally로 실행하며 부모 트랜잭션 내에서 실행될 경우 일시 정지
- NEVER : nontransactionally로 실행되며 부모 트랜잭션이 존재한다면 예외가 발생
- NESTED : 해당 메서드가 부모 트랜잭션에서 진행될 경우 별개로 커밋되거나 롤백될 수 있음. 둘러싼 트랜잭션이 없을 경우 REQUIRED와 동일하게 작동
@Transactional(propagation = Propagation.REQUIRED)
public void doSomething() { ... }
'Backend > spring' 카테고리의 다른 글
[Spring] @Mapper 너는 누구니? (0) | 2021.08.08 |
---|---|
[Spring] @Repository는 언제 쓰나요? (0) | 2021.08.07 |
[Spring] JPA DB Connection 다중으로 사용하기! (0) | 2021.08.03 |
[Spring JPA] JpaRepository update업데이트 하고 싶지만 save (0) | 2021.08.02 |
[Spring] RESTful 서비스 설계 - Exception 설계한 Response 처리 (0) | 2021.07.24 |