Overview
I am using Spring Boot 3.0 RC1 and GraalVM latest.
My native image works fine.
@JsonNaming(PropertyNamingStrategies.UpperSnakeCaseStrategy.class)
Using the above annotation for upper case JSON field names works fine with jar,
but it doesn't work when running in the native image.
I am also using Lombok @Data on my POJO.
2022-10-26T14:42:15.875+02:00 WARN 1 --- [nio-8080-exec-4] .w.s.m.s.DefaultHandlerExceptionResolver : Resolved [org.springframework.http.converter.HttpMessageNotWritableException: Could not write JSON: Error creating bean with name 'com.fasterxml.jackson.databind.PropertyNamingStrategies$UpperSnakeCaseStrategy': Failed to instantiate [com.fasterxml.jackson.databind.PropertyNamingStrategies$UpperSnakeCaseStrategy]: No default constructor found] |
Related Issues
Overview
I am using Spring Boot 3.0 RC1 and GraalVM latest.
My native image works fine.
Using the above annotation for upper case JSON field names works fine with jar,
but it doesn't work when running in the native image.
I am also using Lombok
@Dataon my POJO.Related Issues
@RegisterReflectionForBindingshould register hints for Jackson annotations #29426@JsonDeserialize(builder = ...)does not work in GraalVM native image #29646