REST has become another means of providing web services.
The data can be shared across applications using XML, text, or in JSON format. REST web services are considered as lightweight web services.
Let's apply Spring Security for accessing the REST web service, so that only authorized users can access the RESTful web service. Since the RESTful web service is accessed with a URL and uses HTTP protocol we can easily apply the URL level security. This example demonstrates form-based authentication. But the user can also use BASIC and Digest Authentication.
The following are the annotations used with Spring to generate RESTful web services: