Hi,
I've created a POJO and used the @Getter and @Setter annotation to generate the getters and setters. I now want to call one of the setter methods but the code does not recognize the method. The error says "method is unrecognized".
How do you access a setter using Lombok from another class?
POJO:
@ToString
public class Person implements Serializable {
/**
*
*/
private static final long serialVersionUID = -7748826653062256252L;
private @Getter @Setter String cn;
private @Getter @Setter List<String> groupMembership;
private @Getter @Setter boolean isEmployee;
}
Calling code:
public Person getUserPerson(HttpServletRequest request) {
Person userPerson = new Person();
userPerson.setCn("test");
return userPerson;
}