Closed
Description
Jan Zahornadsky opened SPR-14336 and commented
After changes introduced in #17894, the new conditions are causing that in a project that uses both XML (via JAXB) and JSON (via Jackson) AllEncompassingFormHttpMessageConverter no longer works correctly with XML.
Referring to the code in https://github.com/spring-projects/spring-framework/blob/master/spring-web/src/main/java/org/springframework/http/converter/support/AllEncompassingFormHttpMessageConverter.java, the condition for including Jaxb part converter should read
// instead of && !jackson2Present
if (jaxb2Present && !jackson2XmlPresent) {
addPartConverter(new Jaxb2RootElementHttpMessageConverter());
}
Affects: 4.2.6
Issue Links:
- AllEncompassingFormHttpMessageConverter prioritizes Jackson 2 XML over JSON [SPR-13309] #17894 AllEncompassingFormHttpMessageConverter prioritizes Jackson 2 XML over JSON
Referenced from: commits abcfffd, d0b2fe5
Backported to: 4.2.7