I started the REST project on github to explore writing an elegant RESTful Web Service with the latest and greatest Spring had to offer. That was Spring 3.1 and now Spring 3.2, moving towards Spring 4.
Since then, the project has generated a number of articles and tutorials, mainly on Spring Persistence and Spring Security and REST, with the purpose of building, configuring and securing a proper, production ready REST API with Spring.
The initial steps in bootstrapping a Spring based web application with minimal to no XML configuration.
How to set up REST with Spring – the Controller and HTTP response codes, configuration of payload marshalling and content negotiation.
The focus here is setting up the persistence layer with Spring 3 and Hibernate.
This article is similar – it discusses the option of setting up persistence with Spring 3 and JPA, with Hibernate as the persistence provider behind JPA.
Before turning to Spring Data to simplify the DAO layer with Spring, a pure Java option is introduced – a single, generified DAO, resulting in elegant data access, with no unnecessary clutter.
This makes the jump into Spring Data JPA, detailing the configuration and setup of Persistence with Spring 3 and Spring Data JPA. This will result in an extremely lightweight DAO layer, with only a few interfaces, with Spring Data actually generating the DAOs and queries automatically.
The focus here is transaction configuration with Spring 3 and JPA; transaction management in Spring, best practices, the transaction propagation and common JPA pitfalls are all discussed in detail.
Next, on to the topic of REST
Moving to the Web Layer, the article focuses on setting up REST with Spring, the Controller and HTTP response codes, configuration of payload marshalling and content negotiation with both XML and JSON.
This continues the discussion on RESTful architecture, focusing on Discoverability of the RESTful service, HATEOAS and practical scenarios driven by tests.
Continuing the previous article on Discoverability in a RESTful architecture, the focus here is on the actual implementation of discoverability and satisfying the HATEOAS constraint in Spring 3.
This article shows how to implement pagination in a RESTful web service.
This article shows how to set up authentication with Spring Security against a RESTful web service.
This article will focus on testing a RESTful Service with multiple Media Types/representations.
This article will focus on how to implement Exception Handling with Spring for a REST API. We’ll look at the older solutions available before Spring 3.2 and then at the new Spring 3.2 support.
Finally, we focus on Security
Moving over to security, the focus here is on basic Form-based authentication with Spring Security 3.1.
This article picks up the other options of securing a REST service with Spring – discussing Basic and Digest authentication and how to configure both protocols for the same URI mapping of the API.
Further Topics to Explore
1. A request limitation mechanism for REST
2. Richer link semantics in REST and a ATOM based REST representation
In the meantime, you can check out the full implementation in the github project.
P.S. If you read this far, you should follow me on Twitter.