Spring MVC

Spring From the Trenches: Creating a Custom HandlerMethodArgumentResolver

A few weeks ago we learned to transform the value of a single request parameter into an object, which is passed to our controller method as a method parameter, by using Spring type converters. Using type converters is a good choice if we want to create "simple" value objects and inject these objects into our […] Read more

Spring From the Trenches: Using Type Converters With Spring MVC

A few weeks ago we learned how we can parse date and time information from a request parameter by using the @DateTimeFormat annotation. This is a simple and clean solution that works very well if we don't have "too many" controller methods that use this approach. The drawback of this solution is that we have […] Read more

The Best Comments of June 2015

I think that the best part of writing a blog is to get comments from my readers. Because I have learned a lot from my readers, I want to “reward” the best comments, help you to learn new things, and (hopefully) encourage people to leave more comments. The rules are simple: I select X best […] Read more

Spring From the Trenches: Returning Git Commit Information as JSON

There are situations when we must know the exact version of our web application that is deployed to a remote server. For example, a customer might want to know if we have already deployed a bug fix to the server X. We can, of course, try to find an answer to that question by using […] Read more

Spring From the Trenches: Returning Runtime Configuration as JSON

If we need to figure out the runtime configuration of a Spring web application that is deployed to a remote server, we need to the read the properties file found from the remote server. This is cumbersome. Luckily, there is a better way. This blog post describes how we can Write the runtime configuration to […] Read more