Serializing JPA entities to JSON using Jackson

前端 未结 2 478
小蘑菇
小蘑菇 2020-12-29 16:10

Question regarding combination of Jackson/JPA

  1. If there are about 20 entities in current application and I have add Jackson dependency in POM, does it mean a

2条回答
  •  难免孤独
    2020-12-29 16:32

    No, you don't need to add @JsonIgnore on every class and if you had tried you would have gotten a compile error, since you can't put it there. Jackson will only work on objects you give to it, it's no magic.

    The Jackson documentation is easily found online, such at its project page on github or on the codehaus website.

提交回复
热议问题