java – How to fix org.hibernate.LazyInitializationException: failed to lazily initialize a collection of role: info, could not initialize proxy – no Session

I have a customer and a customer info entity in my spring boot project. They have an one to many relationship. @Data @Builder @Entity @NoArgsConstructor @AllArgsConstructor @Table(name = “customer”) public class Customer implements Serializable{ @Serial private static final long serialVersionUID = 1L; @Id @GeneratedValue(strategy = GenerationType.IDENTITY) private Long serialNumber; private Long customerId; private String name; … Read more