Get Even More Visitors To Your Blog, Upgrade To A Business Listing >>

How to return JSON, XML or Thymeleaf Views from Spring MVC Controller?

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. 


This post first appeared on Javarevisited: Blog About Java Programmin, please read the originial post: here

Share the post

How to return JSON, XML or Thymeleaf Views from Spring MVC Controller?

×

Subscribe to Javarevisited: Blog About Java Programmin

Get updates delivered right to your inbox!

Thank you for your subscription

×