标签:数据 mil update 变化 persist new t new sys created
@PrePersist
public void prePersist() {
updatedAt = new Timestamp(System.currentTimeMillis());
createdAt = new Timestamp(System.currentTimeMillis());
}
/**
* 在持久化时,数据有变化,此方法会执行
*/
@PreUpdate
public void preUpdate() {
updatedAt = new Timestamp(System.currentTimeMillis());
}
标签:数据 mil update 变化 persist new t new sys created
原文地址:http://www.cnblogs.com/xingzc/p/7154574.html