Lombok @Builder and JPA Default constructor

前端 未结 8 1902
遇见更好的自我
遇见更好的自我 2020-12-04 11:03

I\'m using project Lombok together with Spring Data JPA. Is there any way to connect Lombok @Builder with JPA default constructor?

Code:



        
8条回答
  •  醉酒成梦
    2020-12-04 11:20

    i solved this using all these annotations:

    @Data
    @Builder
    @AllArgsConstructor(access = AccessLevel.PACKAGE)
    @NoArgsConstructor(access = AccessLevel.PACKAGE)
    

提交回复
热议问题