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
I had the exact same problem and I found the solution on Spring documentation website : here
In synthesis, I added the following dependency to the pom.xml
of my project :
com.fasterxml.jackson.dataformat
jackson-dataformat-xml
Then I added the following code block to the class that the service had to return :
import javax.xml.bind.annotation.XmlRootElement;
@XmlRootElement
public class Greeting {...}
And it worked.