When we are writing a web application, we often face a requirement which states that our application must provide reporting to its users. Typically the users of our application want to see these reports on the user interface and have the possibility to export them as Excel and/or PDF documents. The problem is that creating […] Read more
Spring Framework
The previous part of this tutorial taught us how we can add custom methods into a single repository. Although that is a very useful skill, it doesn't help us when we have to add the same method into all repositories of our application. Luckily for us, Spring Data provides a way to add custom methods […] Read more
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
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
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
A few days ago I had to write a controller method that is used to upload files to a Spring web application. This is an easy task, but I had another requirement that turned out to be a problem: every file has an expiration date that must be given when the file is uploaded. What […] Read more