In our previous recipe, we interacted with data using web forms. In this recipe, we will see how to interact with data using RESTful web services. These web services are a means to interact with other applications using the known HTTP protocol and its methods, namely GET, POST, and PUT. The data can be exchanged in the form of XML, JSON, or even plain text. We will be using JSON in our recipe.
So, we will create RESTful APIs to support retrieving data, creating new data, editing data, and deleting data.
As usual, download the starter project from http://start.spring.io/ by selecting the dependencies shown in the following screenshot: