How to persist LocalDate with JPA?

后端 未结 5 727
栀梦
栀梦 2020-12-04 01:22

I want to store Date without time into my database. So, I choose to use LocalDate type.

As mentioned in this article, I use a JPA converter to convert

5条回答
  •  爱一瞬间的悲伤
    2020-12-04 02:13

    JPA 2.2 supports LocalDate, so no converter is needed.

    Hibernate also supports it as of 5.3 version.

    Check out this article for more details.

提交回复
热议问题