@Transactional1 영속성 처리하는 Method에 @transactional는 항상 붙이는게 맞을까? 문제 오늘 회사에서 특정 기능을 배포하자마자 문제가 발생했다. 핀포인트에서 발생하고 스택 트레이스는 다음과 같았다. > lazyinitializationexception could not initialize proxy Spring Boot, JPA 활용하는 개발자에게는 흔히 발생되는 예외중 하나이다. 이 예외가 발생하게된 이유는 무엇일까? 코드를 통해 이해해보자. @Entity public class Order { private long id; @OneToMany(mappedBy = "order", fetch = FetchType.LAZY) private List orderItems; } public interface OrderRepository extends JpaRepository { } @Servi.. 2024. 4. 20. 이전 1 다음