To consume this RESTful microservice, let's create a consumer web application. This web application will consume RESTful service endpoints. Spring provides several ways to consume microservices, but in this web application, we will use the RestTemplate class. This RestTemplate class allows you to send HTTP requests to a RESTful server and fetch data in a number of formats, such as JSON and XML.
The format of data depends on the presence of marshalling classes on the classpath of the web application. The web application will support the JSON format if Jackson JARS are present in the classpath. Similarly, it will support the XML format if JAXB JARS are present in the classpath.
In this web application, the