What is the preferred way to create class that is
add ConstructorProperties:
lombok.config file in an appropriate location with the line:
lombok.anyConstructor.addConstructorProperties = true@Value annotation to your class to make it immutableThen serialization and deserialization by Jackson works as expected.
This method:
Edit: 2020-08-16
@Builder with @Value causes this solution to fail. (Thanks to comment from @guilherme-blanco below.)
However, if you also add e.g. @AllArgsConstructor it does still work as expected.