April 2018
Intermediate to advanced
432 pages
10h 38m
English
As a first step, let's create RESTful Web Services exposing some data to the calling clients. As mentioned before, the Jackson library, which is responsible for the serialization and deserialization of JSON messages, is automatically included in our classpath together with spring-boot-starter-web. Thanks to that, we don't have to do anything more than declare a model class, which is then returned or taken as a parameter by REST methods. Here's our sample model class, Person:
public class Person { private Long id; private String firstName; private String lastName; private int age; private Gender gender; public Long getId() { return id; } public void setId(Long id) { this.id = id; } //...}
Spring Web provides some ...