I have a spring-boot 1.1.7 application that uses Thymeleaf for much of the UI, so the response from my controllers hasn\'t really been a concern. However, now I need to pro
In addition to what Michael told in his answer, I added the following dependencies as well to pom.xml
org.codehaus.woodstox
woodstox-core-asl
4.4.1
For some reason, the jackson-dataformat-xml alone was not helping. I also made sure that ResponseEntity is returned in the get call and removed the produces=MediaType from the RequestMapping annotation.
With these changes, I was able to get the correct data but I had to give the extension of mime type to the REST URL during get call. ie, specify explicitly like: http://localhost:8080/hello.xml or http://localhost:8080/hello.json in browser