Recent posts

Improve Your Spring REST API, Part III

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 o...

Improve Your Spring REST API, Part II

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 r...

Improve Your Spring REST API, Part I

After watching Jonathan Dahl’s presentation about API design from the Øredev conference last year, especially the parts about Smart Validations, it is appare...

Spring Controller Tests 2.0

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 eas...

Mockito and Dependency Injection

When writing your Java unit test you will soon need a way to handle the dependencies of your classes under test. Mockito have some nice features that simplif...