Sometimes, we have demands from clients that require a REST service that consumes JSON/XML or any other format dynamically. In this tutorial, we're going to show you how to do exactly that with Spring Boot.
Here is the class that I am taking as a request body in my API. Here, I am using @XmlRootElement
annotation to mark an Employee
class as a root. For more details about this annotation, please click here.