Lombok 1.18.0 and Jackson 2.9.6 not working together

后端 未结 5 984
南笙
南笙 2020-12-09 03:03

The deserialization is failing after the update.

I updated my micro-service from Spring 1.5.10.RELEASE to Spring 2.0.3.RELEASE

5条回答
  •  醉话见心
    2020-12-09 04:00

    Solution 4

    • Write the NoArgsConstructor yourself. This at least worked for me with lombok 1.18.8 and Jackson 2.9.9
        @Builder
        @Getter
        @AllArgsConstructor
        public class EventDTO {
    
            private String id;
            private Integer isCancelled;
    
            private String recurringEventId;
    
            private String summary;
            private String description;
            private String location;
            private String startDateTime;
            private String endDateTime;
    
            /**
             * Make Jackson happy
             */
            public EventDTO() {
            }
        }
    

提交回复
热议问题