debug调式的截图
实体类:
package com.imooc.dataobject;
import lombok.Data;
import org.hibernate.annotations.DynamicUpdate;
import javax.persistence.Entity;
import javax.persistence.GeneratedValue;
import javax.persistence.Id;
import java.util.Date;
/**
类目
*/
@Entity
@DynamicUpdate
@Data
public class ProductCategory {
@Id//主键
@GeneratedValue//自增
private Integer categoryId;//类目id
private String categoryName;//类目名字
private Integer categoryType;//类目编号
private Date createTime;
private Date updateTime;
public ProductCategory() {
}
public ProductCategory(String categoryName, Integer categoryType) {
this.categoryName = categoryName;
this.categoryType = categoryType;
}
}
将 private Date createTime; private Date updateTime;去掉就可以添加时间。