May 2015
Intermediate to advanced
234 pages
4h 18m
English
In this recipe, from a Spring controller method, we will retrieve data from an existing REST service.
We will query the REST service of the previous Creating a REST service recipe.
We will convert the JSON data received from the REST service to User objects. We will use this User class:
public class User implements {
private String name;
private int age;
// ... getters and setters
}Here are the steps for using a REST service:
pom.xml:<dependency> <groupId>com.fasterxml.jackson.core</groupId> <artifactId>jackson-core</artifactId> <version>2.4.2</version> </dependency> <dependency> <groupId>com.fasterxml.jackson.core</groupId> <artifactId>jackson-databind</artifactId> ...
Read now
Unlock full access