Omitting some Setters/Getters in lombok

Опубликовано: 08 Январь 2025
на канале: TramoTech
1,293
9

the @Data annotation at class level generates by default accessors for all property with public access. To omit some Setters/Getter you need to annotate the field with Setter/Getter and use the special access level NONE to completely omit ehe accessor. For example:
@Setter(AccessLevel.NONE)