Java/Spring Boot JPA

Builder and AllArgsConstructor Annotation

remoted 2024. 4. 2. 15:24
728x90

Although Source code used to take Builder annotation, two annotation between Builder and AllArgusConstructor was not chained in IntelliJ.

 

Let show e.g


@Builder(toBuilder = true)
public class BlahBlahEntity {


    no usages
    public BulkMailDetailEntity(Long id, ...) {
        this.id = id;

    }

}

 

Since AllArgsConstructor and NoArgsConstructor will obscure dependency relationship when you launch to compile your sourcue code, make constructor manually as possible. 

 

Though use Builder annotation, the same constructor as AllArgsConstructor, to be defined for goals was not chained.

Since, In fact, the constructor was not used to take part in.