BAEL-5135 ommiting one setter/getter in Lombok (#11386)

Co-authored-by: Adrianna Zychewicz <adrianna.zychewicz@decerto.pl>
This commit is contained in:
makapszenna 2021-11-20 16:57:51 +01:00 committed by GitHub
parent b772babc50
commit 13348bab48
2 changed files with 34 additions and 0 deletions

View File

@ -0,0 +1,18 @@
package com.baeldung.lombok.exclusions;
import lombok.AccessLevel;
import lombok.Data;
import lombok.Getter;
import lombok.Setter;
@Data
public class Employee {
@Setter(AccessLevel.NONE)
private String name;
private String workplace;
@Getter(AccessLevel.NONE)
private int workLength;
}

View File

@ -0,0 +1,16 @@
package com.baeldung.lombok.exclusions;
import lombok.AccessLevel;
import lombok.Getter;
import lombok.Setter;
public class User {
@Setter(AccessLevel.NONE)
private long id;
private String login;
@Getter(AccessLevel.NONE)
private int age;
}