Spring/DB연동
@Transactional , JPA , SimpleJpaRepository
doriver
2025. 4. 15. 16:52
SimpleJpaRepository
* Default implementation of the {@link org.springframework.data.repository.CrudRepository} interface. This will offer you a more sophisticated interface than the plain {@link EntityManager} .

SimpleJpaRepository를 확인해 보면
@Transactional 어노테이션이 적용되어 있는 것을 알 수 있다.

SimpleJpaRepository 클래스 전역에 @Transactional(readOnly = true)가 설정되어 findById는 읽기 전용으로 동작
https://yoonseon.tistory.com/167
@Tracsactional 없이 save()가 동작한다?
개요최근 코드리뷰를 하게 되던 중, 비즈니스 로직에 @Transactional 어노테이션이 누락되어 있는 코드를 보게 되었습니다. 저는 매번 Service를 구현할 때 외부에서 호출하는 public 메인 비즈니스 로
yoonseon.tistory.com