@Entity
@Table(name = "USERS")
public class User {
@Id
@GeneratedValue(strategy = GenerationType.AUTO)
private long id;
@Column(name = "USERNAME", nullable = false, length = 20)
private String userName;
@Column(name = "PASSWORD", nullable = false, length = 10)
private String password;
@Column(name = "Date", nullable = false )
private Date date;
}
如何选择日期介于
之间的记录答案 0 :(得分:0)
与其他字段相同:< => =或等等
您可以使用commons-lang / DateUtils来修改日期。