Skip to content

Add class hints for Jackson annotations on fields and methods #30208

@tuckeremulls

Description

@tuckeremulls

@JsonDeserialize(using=MyCustomLocalDateDeserializer.class) does not seem to be working in my project using Spring 3.0.4 and GraalVM latest. It works fine when running the project in my IDE to test, but fails with the following exception when running the image:

No default constructor found

Even though there is a default constructor defined in my implementation:

public class MyCustomLocalDateDeserializer extends StdDeserializer<LocalDate> { public MyCustomLocalDateDeserializer() { this(null); } public MyCustomLocalDateDeserializer(Class<LocalDate> t) { super(t); } @Override public LocalDate deserialize(JsonParser jsonParser, DeserializationContext deserializationContext) throws IOException { ... } } 

I have placed the annotation on the field of a response object coming back from a web client call:

public class SomeResponseObject { @JsonDeserialize(using = MyCustomLocalDateDeserializer.class) private LocalDate someDate; ... } 

Does support for this not exist yet? I saw the below threads but was unsure if this specific case had been encountered yet.

#29646
#29386

Metadata

Metadata

Assignees

Labels

in: coreIssues in core modules (aop, beans, core, context, expression)theme: aotAn issue related to Ahead-of-time processingtype: enhancementA general enhancement

Type

No type

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions