-
Notifications
You must be signed in to change notification settings - Fork 355
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
Jackson module auto-discovery sets Jaxb Annotation Introspector as primary #4723
Comments
It really hurts in DTOs with mixed annotations(jaxb ones are used for legacy xml endpoints). public class Dto {
@XmlElement(name = "jaxb")
@JsonProperty("jackson")
public String field;
} response for Dto("abc") is |
This was referenced Jun 26, 2021
Merged
This was referenced Jul 6, 2021
This was referenced Aug 5, 2021
This was referenced Aug 30, 2021
1 task
This was referenced Oct 4, 2021
This was referenced Mar 7, 2022
This was referenced Mar 15, 2022
This was referenced Apr 17, 2022
This was referenced May 3, 2022
Closed
1 task
Closed
1 task
1 task
This was referenced Oct 19, 2022
Closed
1 task
This was referenced Feb 11, 2023
Closed
1 task
This was referenced May 11, 2023
This was referenced Jun 15, 2023
This was referenced Jul 6, 2023
1 task
This was referenced Apr 13, 2024
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Hello.
Initially, when creating Jackson' ObjectMapper for Jersey needs, annotation introspectors order is defined - Jackson annotations first, JAXB annotations second (org.glassfish.jersey.jackson.internal.jackson.jaxrs.json.JacksonJaxbJsonProvider#DEFAULT_ANNOTATIONS).
31bd872 introduced module auto-discovery. If we have JAXB module in class path, when it is discovered and registered, it pushes JAXB annotation introspector back to primary (that's the default behavior of the module), thus breaking intended logic.
It looks like a bug, but maybe I'm missing something? Some configuration options?
The text was updated successfully, but these errors were encountered: