Open bolds07 opened 1 year ago
This sounds related to #3315 which we fixed in the current release (1.18.30). I'm considering this done-already fixed unless you still run into this issue on 1.18.30.
close if no feedback after: 2023-10-02.
@bolds07 BTW, Why do you need lombok.copyableAnnotations += org.springframework.beans.factory.annotation.Value
? Spring sees it on the field and injects directly into the field. With this config line, don't you have two injections (first into the field and second into the setter)?
Could I recommend my lombok.config lines:
lombok.copyableAnnotations += org.springframework.beans.factory.annotation.Qualifier
lombok.copyableAnnotations += com.fasterxml.jackson.annotation.JsonProperty
lombok.copyableAnnotations += com.fasterxml.jackson.databind.annotation.JsonDeserialize
lombok.copyableAnnotations += com.fasterxml.jackson.annotation.JsonFormat
It probably has sense for constructor injections, though…
Describe the bug I think it is a bug on Lombok library or I am missing something really stupid here. It is only copying the
@JsonFormat
annotation into the setter method, not into the getterTo Reproduce I have a pojo class
and i've a lombok.config file:
Expected behavior But even with this configuration
ObjectMapper
was still serializing that field as ISO date... I lost at least 3 hours and debugged a lot then I decided to look at the generated sources folder in my projectthere i fould:
the jsonformat annotation is only being copied at the setter, so the objectmapper really can't have a clue on how i want to serialize this field.
Am I doing something wrong? I am missing some detail?
Version info (please complete the following information):
javac 15.0.1