Closed
Description
Hello, when upgrading SpringBoot from 1.x to 2.x, Restful apis which consumes xml as request body are broken because values are deserialised to null.
API is like:
@RequestMapping(
method = POST,
consumes = {APPLICATION_XML_VALUE, TEXT_XML_VALUE},
produces = {APPLICATION_XML_VALUE, TEXT_XML_VALUE})
Response postSomething(@ApiParam(name = "Request", value="A valid <Request /> xml query") @Valid @RequestBody **XmlRequest** xmlRequest);
XmlRequest
used javax.xml.bind.annotation. Then I changed annotation to jackson-dataformat-xml, request body can be deserialised as before.
I don't find any report about javax xml problem. Does SpringBoot 2 have some limitation to use this package? Should XML deserialisation use jackson xml databinding? When I refactored the code, I find out jackson xml databing has less annotation and it works not well with polymorphic subtypes.
Thanks for your help.