Ante Pocedulic 38b419d8e9 Spring Data Rest Validators introduction (#650)
* - created packages for each logical part of application
- created validator for WebsiteUser rest API
- created ValidatorEventRegister class which fixes known bug for not
detecting generated events
- created custom Exception Handler which creates better response
messages

* Code formatting

* formated pom.xml
replaced for loops with streams
fixed bug while getting all beans

* removed unnecessary code
changed repository type

* - added test for Spring Data REST APIs
- changed bad request return code
- formated code
2016-09-15 07:55:11 +02:00

42 lines
726 B
Java

package com.baeldung.models;
import javax.persistence.Entity;
import javax.persistence.GeneratedValue;
import javax.persistence.GenerationType;
import javax.persistence.Id;
@Entity
public class WebsiteUser {
@Id
@GeneratedValue(strategy = GenerationType.AUTO)
private long id;
private String name;
private String email;
public long getId() {
return id;
}
public void setId(long id) {
this.id = id;
}
public String getName() {
return name;
}
public void setName(String name) {
this.name = name;
}
public String getEmail() {
return email;
}
public void setEmail(String email) {
this.email = email;
}
}