Java 9 - Optional Additions

In Java 8, the java.util.Optional class was introduced (JavaDoc) as a way to define method return types where there is a need to return no result, and where...

Java 9 - JShell

As I have been developing in Groovy for quite some time (and still enjoy it whenever I get a chance to use it), I always was quite a fan of...

Mocking JSF's FacesContext

When you are in a JSF application and you want to write tests for your view beans, you will very likely come into the situation of having to mock JSF’s...

Query by Example in Spring Data

We are currently using Spring Data JPA in a project and really love it. Lately we came across a feature we sort of oversaw so far in Spring Data’s excellent...

Spring Boot's @Conditional Annotations

One of the outstanding features of Spring Boot is without doubt its auto-configuration capability. However, auto-configuration is implemented upon another great Spring feature: conditional annotations. @Conditional Annotations Spring 3.1...

Quick Tip - AssertJ

As one of my current projects is heavily Spring Boot based, I naturally came across the boot-starter-test package very early. The starter-test module comes with a couple of pre-configured...

Spring Bean Removal

In one of my current projects we had the requirement to remove Spring beans during application startup. The actual context being that batch programs shared the same application code then...