Closed ilopmar closed 1 month ago
This issue has been addressed in 4.1.4-SNAPSHOT. So make your <spring-cloud.version>2023.0.4-SNAPSHOT</spring-cloud.version>
and you should be fine. Just tested it.
You can verify it with this simple code which indeed fails in 2023.0.3
and not 2023.0.2
. But then again succeeds with 2023.0.4-SNAPSHOT
ApplicationContext context = SpringApplication.run(DemoApplication.class, args);
String json = "{\n"
+ " \"type\": \"OVA\",\n"
+ " \"ova\": {\n"
+ " \"image\": {\n"
+ " \"image_type\": \"IMAGE_URI\",\n"
+ " \"location\": \"s3://xxxxxxxxx/bitnami-neo4j-5.24.2-r0-debian-12-amd64.ova\"\n"
+ " }\n"
+ " },\n"
+ " \"emitted_on\": \"2024-10-16T09:59:03.561548427Z\"\n"
+ "}";
JsonMapper mapper = context.getBean(JsonMapper.class);
System.out.println((Payload) mapper.fromJson(json, Payload.class));
Describe the bug
In my project we receive json messages through Kafka that are deserialized automatically to Java objects. Those java objects are created automatically using Async API Spec.
We have upgraded
org.springframework.cloud:spring-cloud-dependencies
(SCD) from2023.0.1
to2023.0.3
and we found one issue deserializing some messages.I've tracked down the problem to
spring-cloud-function-context:4.1.3
(included in SCD 2023.0.3). Forcing that version to the previous one4.1.2
makes it work again.This is the stacktrace:
Sample
There is a sample project with the detailed explanation and all the steps necessary to reproduce the issue in https://github.com/ilopmar/issue-spring-cloud-function-context. Please follow the instructions on the README file to reproduce the issue with
2023.0.3
and then to make it work with2023.0.2