Spring Boot Error Responses
I have written about Spring's support for web response error handling a few times before (e.g. about custom error responses and how they can be generalized). This time, we will…
I have written about Spring's support for web response error handling a few times before (e.g. about custom error responses and how they can be generalized). This time, we will…
It's often useful to have both an API and a website serving HTML in the same project. Compojure is a popular routing library in Clojure built on top of the…
Spring Boot brings about some welcome defaults configurations that significantly decreases the development time of Spring projects. It also has some useful additions when it comes to simplified integration testing.…
It is now about four and a half years since the Servlet 3.0 specification was released in December 2009, together with Java EE 6. One feature that came in Servlet…
The REST Assured test library for Java was recently updated to version 2.2 and one of the new features is support for unit testing Spring MVC controllers using the new…
When exposing REST or HTTP based service APIs it's important to validate that the API behaves correctly and that the exposed data format is structured in an expected manner. Using…
REST Assured is a simple Java library for testing of REST services and a new major version has just been released. Not only is it easy to use and get…
Spring 4 is around the corner. Milestone releases has been available for a while, the first release candidate was released earlier today, and the final release is expected before the…
A while ago we decided to upgrade Jackson from 1.x to 2.x (faster jackson). We were also using JAXB to map Java objects to JSON and Jersey for exposing our…
Some time ago, I wrote about how the error response of a Spring based REST API can be enhanced, in order to provide the clients with a better understanding of…
In this post we will implement the bookshop example (outlined in Why hypermedia APIs) as a hypermedia API using the framework Forest. This is a very long post because it…
When we talk about creating RESTful services using hypermedia we often get into discussions why the links are necessary. Why not simply publish a list of available URI:s and the client can code directly using these links? Won't there be much overhead in putting links into every response? In this blogpost we will try to explain why we think a hypermedia API is useful.
In the previous blog post, I explained how a custom @ExceptionHandler can be used to return feedback to REST API clients when they are submitting erroneous requests. However, the suggested…
After watching Jonathan Dahl's presentation about API design from the Øredev conference last year, especially the parts about Smart Validations, it is apparent that you can do much more to…
Spring has many tools in the toolbox to facilitate testing. However, when it comes to testing a Controller, the tools have been a bit blunt. To make life easier, Sam…