我在POJO类中使用了@Data注释,但是没有生成getter和setter。我使用的IDE是sts(Spring Tool Suite)import lombok.Data;
public class UserVo {dependency> <groupId>org.projectlombok</grou
and setter methods以及该接口的实现,有更多的成员对应于父接口。编译器无法识别Lombok生成的getter /setter,因此我必须添加实际的getter方法,以使下面的类可编译。@Getterpublic class TestImplementation implements TestInterface {
//moremember
我可以在不显式定义getter的情况下使用@JsonIgnore和@Getter注解吗?因为我在序列化对象时必须使用这个JsonIgnore,但是在反序列化时,必须忽略JsonIgnore注解,这样我的对象中的字段就不能为空。@Getterpublic class User {
private password;我知道,只需在密码的getter上定义JsonI