What is the javax.validation
package in Java EE? How to use this with JPA?
I want to validate my JPA Entity with the @NotNull
annotation. My JPA implementation is Hibernate.
Here's my Entity:
public class Employee implements Serializable , EmployeeDetail {
private static final long serialVersionUID = 1L;
@Id
@GeneratedValue
private int id;
private String name;
private long salary;
...
See Question&Answers more detail:
os 与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…