Exposing a REST API

Nowadays most of the big social network companies like Facebook and Twitter expose some services through REST API calls, making them easy to integrate with other applications. In this chapter, you are going to extend your code by adding some new functionality. You are going to expose a RESTful API so other people can easily send, receive, update, and remove documents from your Spring application over the HTTP protocol. And yes, this is a web application too!