The Best Comments of April 2016

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 comments that were left on my blog during the previous month.
  • I link to these comments and explain why I chose them.
  • If the author of the selected comment has a blog, I add a link to her/his blog as well.

Enough with chit chat. The six best comments of April 2016 are (in chronological order):

The Six Best Comments of April 2016

  • Fernando asked me to write a blog post that describes how he can invoke a stored procedure with JPA. I selected this comment on this list because I have a feeling that this is a quite common use case. Unfortunately I decided to not write that blog post. Instead I asked Fernando to read a blog post that is written by Thorben Janssen.
  • Felipe Carvalho suggested that if you use Gradle and Spring Boot, and you need to return Git commit information as JSON, you should use the Gradle plugin that creates the file and creates a Spring Boot Actuator endpoint which returns the contents of that file as JSON. I selected this comment on this list simply because it is useful.
  • Klaus UNGER spotted a copy-paste problem from my blog post that describes how you can write the output data of your Spring Batch job to a file. I selected this comment on this list because I hope that people would add a new comment every time when they notice a mistake. This is important because otherwise I cannot fix that mistake, and other people might get wrong information.
  • Kaidjin pointed out that NestedRunner and ContextHierarchicalRunner do not work with SpringClassRule and SpringMethodRule. I selected this comment on this list because it's sad that we still cannot use nested configuration in our integration tests.
  • MJ run into a problem that was caused by a bug found from Spring Security 4.0.2. The bug prevented him/her from running scheduled jobs, which use secured methods, more than once. I selected this comment on this list because it reminds us from the fact that it's important to keep our dependencies up-to-date. As I pointed out, MJ can solve his/her problem by updating Spring Security.
  • Kostadin Golev pointed out that it is an awful idea to use inheritance in your test suite just because you want to make your tests easier to write. He also shared a nice Spring MVC Test tip that helps you get rid off boilerplate code. I selected this comment on this list because I agree with him and his tip is really awesome. By the way, Kostadin has an interesting blog. Check it out.
2 comments… add one
  • Vojtech Ruzicka Sep 17, 2016 @ 19:09

    Great idea, I like it. Unfortunately it seems that this was the last post in the series. What happened? Do you have any plans to bring this back to life and continue with the series?

    • Petri Sep 27, 2016 @ 22:38


      Well, the problem was that this series never got popular enough, and when I started to record my Test With Spring course, I had to reduce my blog posts to minimum because I spend most of my time creating new content to the course. This series was unfortunately the first one go. After I have finished the course, I will start writing more posts, and I might give this series a second shot.

Leave a Reply