spring jpa 创建时间和更新时间自动更新

@Entity  
@Table(name="RS_SIGNUPUSER")  
public class RsSignUpUser {  
  @Id  
  @GenericGenerator(name="UUIDGENERATE",strategy="uuid2")  
  @GeneratedValue(generator="UUIDGENERATE")  
  @Column(name="ID",length=36)  
  private String ID;  
   @Temporal(TemporalType.TIMESTAMP)  
  @Column(updatable = false)  
  @org.hibernate.annotations.CreationTimestamp   
  private Date CREATETIME;   
  @Column(name="UPDATETIME")  
  @org.hibernate.annotations.UpdateTimestamp  
  @Temporal(TemporalType.TIMESTAMP)  
  private Date UPDATETIME;   

 

你可能感兴趣的:(spring,JPA)