This will work:
@RequestMapping(value = \"/test\", method = RequestMethod.POST, headers = {\"content-type=application/json\"}) { ....... }
Have you tried doing content-type=application/json,application/xml?
content-type=application/json,application/xml
Not sure if it would work but putting two content-type headers in there I think only one will win.
content-type
OR
possibily use two RequestMapping annotations on the same method with different content-type headers?
RequestMapping