catalog指定數據庫名,name指定表名,@Table註解位置在@Entity註解之下
@Table(name="user",catalog="bookshop")
3>使用@Id註解指定當前持久化類的ID表示屬性,與@GeneratedValue配合使用
4>使用@GeneratedValue註解指定ID標識的生成器,與@Id配合使用
5>使用@Column註解指定當前屬性所對應的數據表中的字段,name指定字段名,unique指定是否唯一,nullable指定是否可以爲null,length指定字段長度
@Column(name="Id",unique=true,nullable=false,length=15)