用hibernate插入java.util.Date数据时发现 时分秒 会丢失。如 2014-05-30 15:59:16.921 在postgresql数据库中显示2014-05-30 00:00:00.0。

  后来查了一下是因为Model类的 annotation 中的写成 @Temporal(TemporalType.DATE)  ,正确应该要写成  @Temporal(TemporalType.TIMESTAMP)。

相关文章:

  • 2021-04-22
  • 2021-07-15
  • 2021-09-12
  • 2021-05-29
  • 2021-11-05
  • 2021-11-11
  • 2021-12-01
  • 2021-12-07
猜你喜欢
  • 2021-05-23
  • 2022-02-24
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
相关资源
相似解决方案