`
arantam
  • 浏览: 41579 次
  • 性别: Icon_minigender_1
  • 来自: 广州
文章分类
社区版块
存档分类
最新评论

About the "Date".

阅读更多

When a user registers, a timestamp should be marked down together with other information.

then the property "RegisterTime" of UserBean should be of type "Date", the mapping type in hbm.xml should be "timestamp", and in MySQL, the column type should be "DateTime".

in java, we only need to set a "new Date()" to the property.

 

Ok, the world goes around smoothly.

分享到:
评论

相关推荐

Global site tag (gtag.js) - Google Analytics