Posts

Showing posts with the label SpringRESTClient

Spring REST client using RestTemplate in Eclipse and Maven

Image
In this article, I will be demonstrating how you can create a Spring REST client using RestTemplate. In order to see how you can create a simple Spring REST service, you can refer to this blog post. What is Spring RESTTemplate? Spring provides a class called RestTemplate . This is the starting point in creating a REST client application.  It uses the URI and the HTTP method to invoke in order to connect to a REST service. It has several methods that allow you to invoke the HTTP methods on the specified URI Edit Project Creation Step 1 – Create a Maven Project in Eclipse . You can refer to this blog post. You will get a project as follows:   Step 2 – Add dependencies to POM file. Add the following to your pom.xml file: <properties> <spring.framework>5.1.3.RELEASE</spring.framework> <spring.web>5.1.3.RELEASE</spring.web> </properties> <dependencies> <dependency> <groupId>org.springframewo...