-
Notifications
You must be signed in to change notification settings - Fork 619
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Deserialization problem with Spring Cloud Stream & Spring Cloud Function #1163
Comments
Indeed we just added it to solve another issue. i will take a look and see what we can do |
Here is the issue where it was introduced - #1097 |
Actually i take this back, the only deserialisation feature we have currently is |
I didn't, actually Symptoms are just "as if" this property was forced under the hood. |
Let me try your sample |
I see the issue. It's in s-c-function. I will transfer it there and push the fix shortly |
Seems like PR #1162 addressed the same issue in a diffrent way too |
@olegz This fix doesn't resolve the problem of not all modules being registered. For instance the Kotlin-Module is not registered and that leads to problems when using Kotlin (data classes). |
Describe the issue
Since Spring Cloud 2023.0.3, most of our Spring Cloud Stream bindings are failing to deserialize JSON objects.
It seems Jackson property
DeserializationFeature.FAIL_ON_UNKNOWN_PROPERTIES
is now enabled by default.It wasn't the case in 2023.0.2.
If I send in my message queue a JSON object with more fields than the DTO knows about : it fails during deserialization.
To Reproduce
Here is a sample repo where problem is shown.
There are 2 branches with each Spring Cloud version.
You can execute
MessagingStreamsIT
.Every test runs fine in 2023.0.2 branch, while it fails in 2023.0.3.
As it's shown in some tests, adding
@JsonIgnoreProperties(ignoreUnknown = true)
on every DTO object seems to be a workaround.The text was updated successfully, but these errors were encountered: