User.java 实体类 带 数据库字段模板
package com.tgb.web.controller.entity; import javax.persistence.Column; import javax.persistence.Entity; import javax.persistence.GeneratedValue; import javax.persistence.Id; import javax.persistence.Table; @Entity @Table(name="T_USER") public class User { @Id @GeneratedValue @Column(length=32) private Long id; public Long getId() { return id; } public void setId(Long id) { this.id = id; } @Column(length=32) private String userName; @Column(length=32) private String age; public String getUserName() { return userName; } public void setUserName(String userName) { this.userName = userName; } public String getAge() { return age; } public void setAge(String age) { this.age = age; } }