Ознакамливаюсь со спрингом, непойму почему ругается в моём случае ?
User.class
public class User {
public String getFirstName() {
return firstName;
}
public void setFirstName(String firstName) {
this.firstName = firstName;
}
public String getLastName() {
return lastName;
}
public void setLastName(String lastName) {
this.lastName = lastName;
}
public String getEmail() {
return email;
}
public void setEmail(String email) {
this.email = email;
}
public String getUsedId() {
return usedId;
}
public void setUsedId(String usedId) {
this.usedId = usedId;
}
public List<Address> getAddress() {
return addresses;
}
public void setAddress(Address address) {
this.addresses.add(address);
}
public List<Message> getMessage() {
return messages;
}
public void setMessage(Message message) {
this.messages.add(message);
}
@Override
public String toString() {
return "User{" +
"firstName='" + firstName + '\'' +
", lastName='" + lastName + '\'' +
", email='" + email + '\'' +
", usedId='" + usedId + '\'' +
", address=" + addresses +
", message=" + messages +
'}';
}
private String firstName;
private String lastName;
private String email;
private String usedId;
// One to Many relationship
private List<Address> addresses;
// One To Many relationship
private List<Message> messages;
}