Hello guys, if you are working in Spring based web application and you wan to return JSON, XML, or Thymeleaf View from your application but don't know how to do that then you have come to the right place. Earlier, I have shared how to create REST API in Spring and In this tutorial we are going to discuss, how to return to JSON, XML, or Thymeleaf view from the Spring MVC controller. To ensure that your payload from the MVC endpoint, ensure your project is using the Spring Boot starter web. You can use the following dependency to include spring boot starter web in your project.
Related Articles
This post first appeared on Javarevisited: Blog About Java Programmin, please read the originial post: here