Lombok how to customise getter for Boolean object field?

前端 未结 5 1621
心在旅途
心在旅途 2020-12-08 03:50


One of my POJOs has a Boolean object field to permit NULLS in the database (a requirement). Is it possible to use the @Data Lombok annotation at class level yet ove

5条回答
  •  失恋的感觉
    2020-12-08 04:41

    what is the name of boolean field? according to the lombok doc:

    A default getter simply returns the field, and is named getFoo if the field is called foo (or isFoo if the field's type is boolean)

    lombok will generate getter with name isXXX for your boolean field

提交回复
热议问题