hibernate 配置

一:实体类

(1)主键和类的注释

@Entity
@Table(name = "wechat_phone_section")
public class MemberPhoneSectionEntity {

    private Integer id;
    
    
    @Id
    @GeneratedValue(generator = "paymentableGenerator")
    @GenericGenerator(name = "paymentableGenerator", strategy = "identity")
    @Column(name="id", nullable = false)
    public Integer getId() {
        return id;
    }
    public void setId(Integer id) {
        this.id = id;
    }

 

posted @ 2017-07-07 15:10  ws珍惜现在  阅读(140)  评论(0)    收藏  举报