Client libraries should be self-contained and portable, so that consumers of RESTful web services may use them. It would be tempting to share code between the server side and client side. Doing so would, however, make the client and server code tightly coupled and hinder the portability of the client library.
In the context of our sample property management service, we will build the client library as a new Maven module. This module will need the following dependencies:
<dependency> <groupId>org.springframework</groupId> <artifactId>spring-web</artifactId> <version>4.1.6.RELEASE</version> </dependency> <dependency> <groupId>commons-logging</groupId> <artifactId>commons-logging</artifactId> <version>1.1.3</version> </dependency> <dependency> <groupId>com.fasterxml.jackson.core</groupId> <artifactId>jackson-databind</artifactId> <version...