Blog Archives

Spring Boot: A bit more cool with Kotlin

In the context of my favorite framework, Spring Boot, I have recently started to explore the effect of using the Kotlin 1.1 programming language (as an alternative to Java 8). This post describes a few language features that may be

Tagged with: ,
Posted in Kotlin, Spring

Spring Boot: Prometheus actuator endpoint

In this post I show how you can add support for Prometheus in Spring Boot applications. Step 1 of 2: Add the Prometheus Spring Boot Starter You can get Prometheus support in Spring Boot applications via a so-called “starter”. Here

Tagged with: ,
Posted in Spring

Spring Boot: Controlling timezones with Hibernate

In this post I show how you, from a Spring Boot application, can control the timezone used by Hibernate when it communicates timestamps with the database. This post is inspired by a very similar recent post by Vlad Mihalcea [1], Hibernate

Tagged with: , , ,
Posted in Hibernate, Spring

Spring: Bean qualification

In this post I present how you can control a situation in which there are multiple beans that qualifies for an injection point in Spring. The material here has been tested with Spring Framework 4.3. The problem Let’s first take a look at the

Tagged with: , ,
Posted in Spring

Spring Boot and Gradle: Separating tests

In this post I will present 4 different approaches to separating unit tests from integration tests, so that they can be run independently of each other. Here’s the 4 different approaches: Separation based on name patterns Separation based on JUnit categories Separation based

Tagged with: , , , , , ,
Posted in Spring

Spring Boot 1.4: Gherkin tests

In this post I show how you can implement Gherkin tests for Spring Boot 1.4.1. Here is an example of a Gherkin based test script: The Feature, Scenario, Scenario Outline, Given, When, Then and And constructs are part of the Gherkin test language [1]. Such

Tagged with: , , ,
Posted in BDD, Spring

Spring 4.3: Introducing the InjectionPoint class

Did you know that Spring Framework 4.3 comes with a “hidden” gem: the InjectionPoint class ? At the time of writing this post, InjectionPoint is nowhere to be found in the Spring Framework Reference Documentation [2]. About the InjectionPoint class The InjectionPoint class [1] is a new feature that you can

Tagged with: ,
Posted in Spring