Immutable Lombok annotated class with Jackson

后端 未结 9 2220
再見小時候
再見小時候 2020-12-25 13:02

What is the preferred way to create class that is

  • Immutable
  • Can be serialized/deserialized with Jackson
  • Human-readable and with low level of
9条回答
  •  庸人自扰
    2020-12-25 13:55

    Try the following set of annotations for your pojo:

    @Value
    @NoArgsConstructor(force = true, access = AccessLevel.PRIVATE)
    @AllArgsConstructor
    

提交回复
热议问题