-
Notifications
You must be signed in to change notification settings - Fork 40.9k
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
Configuration for jackson to ignore unknown properties by default #12684
Comments
@leocwolter Can you use a |
Oh wait. I misread your initial comment. I think we set |
See #1237. We do have |
You can use |
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
The spring default and spring override do not apply to the objectmapper Hibernate uses. Customising parsing for json columns in spring is still impenetrable magic. |
Prior to Hibernate 6 (which is not yet supported), I don't think Hibernate uses Jackson. To double-check, I prepped Hibernate's 5.6.9 tag and found no occurrences of If you think there's something that Spring Boot should be configuring with the main |
Ok. I just saw a way of making hibernate use spring's objectmapper (https://stackoverflow.com/questions/66656772/use-jackson-objectmapper-configured-by-spring-boot-in-hibernate) so I assumed it used a similar one by default. I do wish there was a simple way to achieve this with regular spring configs |
The person who asked that question is using Hibernate Types, a library that builds on top of Hibernate. Boot knows nothing about it so it isn't something that we can configure automatically. |
I would like to avoid adding the annotation
@JsonIgnoreProperties(ignoreUnknown = true)
on every class, is it possible to add a configuration for that purpose?I was thinking of something like:
The text was updated successfully, but these errors were encountered: