How to force Hibernate to return dates as java.util.Date instead of Timestamp?

前端 未结 7 833
天涯浪人
天涯浪人 2020-12-04 08:13

Situation:

I have a persistable class with variable of java.util.Date type:

import java.util.Date;

@Entity
@Table(name = \"prd_peri         


        
相关标签:
7条回答
  • 2020-12-04 08:58

    Just add the this annotation @Temporal(TemporalType.DATE) for a java.util.Date field in your entity class.

    More information available in this stackoverflow answer.

    0 讨论(0)
提交回复
热议问题