REST with Spring Tutorial

I usually post about Spring stuff on Twitter - you can follow me there:

Building a REST API for your application is not a trivial task – starting from the definition of what is RESTful and what is not, down to the the nitty-gritty of making sure Http Caching actually works or that clients get the right kind of errors.

Spring has made REST a first class citizen back with the 3.0 release and the platform has been maturing in leaps and bounds since then. With the recent Spring 4.0 release, it is now battle hardened and fully mature – flexible enough to build any RESTful API.

This guide aims to sift through the heaps of information available on the subject and make sure that you know what it takes to build a Secure REST API with Spring and Spring Security.

It deals with the basics – bootstrapping the REST API, the Spring MVC Configuration, testing the live API. The more advanced areas of REST are in focus next – HATEOAS  and pagination, Error Handling and Security (Basic and Digest Authentication).

If Java is the Engine, then Spring is the Fuel

1. The Core REST API


2. Secure the API


3. Test and Consume the API


4. Other Spring Tutorials

=> Building the Persistence Layer of an application with Spring and Hibernate, JPA, Spring Data, etc

=> Common Exceptions in Spring with examples – why they occur and how to solve them quickly

I usually post about Spring stuff on Twitter - you can follow me there:

Get the eBooks and Learn to Build a Simple App
Build a Simple but Working App with Spring


  • venkata


    there are 2 web services deployed on weblogic server, i want to call from A web services to B web services, how can we achieve this using spring , i tried to get the example, but only JMX can solve this one i got. Please guide me on this , its an urgent.

    • Eugen Paraschiv

      If you simply need to call a service from within another, and you cannot do it internally – you can use the RestTemplate (or any other Http client) – and do the call manually.