diff --git a/spring-resttemplate-2/pom.xml b/spring-resttemplate-2/pom.xml
index 2aed154be6..1404a35f33 100644
--- a/spring-resttemplate-2/pom.xml
+++ b/spring-resttemplate-2/pom.xml
@@ -71,16 +71,16 @@
ch.qos.logback
logback-classic
-
+
-
+
-
- org.springframework.boot
- spring-boot-maven-plugin
-
+
+ org.springframework.boot
+ spring-boot-maven-plugin
+
-
+
\ No newline at end of file
diff --git a/spring-resttemplate-2/src/main/java/com/baeldung/resttemplate/json/consumer/service/UserConsumerService.java b/spring-resttemplate-2/src/main/java/com/baeldung/resttemplate/json/consumer/service/UserConsumerService.java
new file mode 100644
index 0000000000..751e234e8b
--- /dev/null
+++ b/spring-resttemplate-2/src/main/java/com/baeldung/resttemplate/json/consumer/service/UserConsumerService.java
@@ -0,0 +1,16 @@
+package com.baeldung.resttemplate.json.consumer.service;
+
+import java.util.List;
+
+public interface UserConsumerService {
+
+ List processUserDataFromObjectArray();
+
+ List processUserDataFromUserArray();
+
+ List processUserDataFromUserList();
+
+ List processNestedUserDataFromUserArray();
+
+ List processNestedUserDataFromUserList();
+}
diff --git a/spring-resttemplate-2/src/main/java/com/baeldung/resttemplate/json/consumer/service/UserConsumerServiceImpl.java b/spring-resttemplate-2/src/main/java/com/baeldung/resttemplate/json/consumer/service/UserConsumerServiceImpl.java
new file mode 100644
index 0000000000..dc1566d971
--- /dev/null
+++ b/spring-resttemplate-2/src/main/java/com/baeldung/resttemplate/json/consumer/service/UserConsumerServiceImpl.java
@@ -0,0 +1,90 @@
+package com.baeldung.resttemplate.json.consumer.service;
+
+import com.baeldung.resttemplate.json.model.Address;
+import com.baeldung.resttemplate.json.model.User;
+import com.fasterxml.jackson.databind.ObjectMapper;
+import org.springframework.core.ParameterizedTypeReference;
+import org.springframework.http.HttpMethod;
+import org.springframework.http.HttpStatus;
+import org.springframework.http.MediaType;
+import org.springframework.http.ResponseEntity;
+import org.springframework.web.client.RestTemplate;
+
+import java.util.Arrays;
+import java.util.List;
+import java.util.stream.Collectors;
+
+public class UserConsumerServiceImpl implements UserConsumerService {
+
+ private static final String BASE_URL = "http://localhost:8080/users";
+ private final RestTemplate restTemplate;
+ private static final ObjectMapper mapper = new ObjectMapper();
+
+ public UserConsumerServiceImpl(RestTemplate restTemplate) {
+ this.restTemplate = restTemplate;
+ }
+
+ @Override
+ public List processUserDataFromObjectArray() {
+ ResponseEntity