首页>代码>Spring MVC+Spring+Hibrenarte实现的简单的CRUD项目实例>/springmvc-hibernate-test/src/ne/springmvc/entity/User.java
package ne.springmvc.entity; import javax.persistence.Column; import javax.persistence.Entity; import javax.persistence.GeneratedValue; import javax.persistence.Id; import javax.persistence.Table; import org.hibernate.annotations.GenericGenerator; /** * 此实体的定义应用了springmvc的注解,省去了传统的Hibernate跟数据库之间的映射配置文件 * * @author will * */ @Entity @Table(name = "T_USER") public class User { @Id @GeneratedValue(generator = "paymentableGenerator") @GenericGenerator(name = "paymentableGenerator", strategy = "increment") private Integer id; @Column(length = 32) private String userName; @Column(length = 32) private String age; public Integer getId() { return id; } public void setId(Integer id) { this.id = id; } 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; } }
![](https://static.zuidaima.com/resource/img/heart_ico.png)
ming_123_9715 LV23
2022年12月13日
zmzmzmzm LV8
2021年7月4日
1973356987 LV13
2021年6月16日
liangge2115 LV27
2020年11月23日
嘿嘿嘿123333 LV3
2020年7月1日
IkunLYY LV4
2020年6月24日
沈思熟虑 LV10
2020年2月19日
1690356080 LV37
2019年12月24日
13148918399 LV9
2019年12月10日
努力的黑仔 LV4
2019年9月27日
![](https://static.zuidaima.com/resource/img/cattle_ico.png)
微信网友_6974071747891200 LV1
5月1日
include LV8
2023年6月20日
兢兢业业
2023年4月29日
暂无贡献等级
彩色天空 LV5
2023年4月2日
微信网友_6328951600910336
2023年1月31日
暂无贡献等级
ming_123_9715 LV23
2022年12月13日
uni-code_0123 LV1
2022年10月24日
17787885952 LV3
2022年5月5日
兰文斌 LV6
2022年4月27日
微信网友_5928854184349696
2022年4月23日
暂无贡献等级