• 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 tests are popular in Behavior-driven development (BDD) and is meant as a common tool between… Continue Reading

  • 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 use in @Bean producer methods. It is specifically useful in @Bean methods that produces prototype scoped beans.… Continue Reading

  • Spring Boot: Sessions actuator endpoint

    This post shows how you can implement a custom Spring Boot Actuator endpoint that prints information about all active HttpSessions: HttpSession meta data is prefixed with @ signs: id, creation time and last accessed time. The other values are a raw dump of all the HttpSession attributes. You can use this endpoint during development to inspect active sessions.… Continue Reading

  • Spring Boot: Introduce your own insight endpoints

    In this post I show how you can develop custom Spring Boot Actuator HTTP endpoints for obtaining detailed insight into your Spring Boot application’s runtime behavior. Here’s an example: The above output is simple. Yet it can be useful to have in many applications. Like the “official” Spring Boot Actuator info output. If you don’t find this concrete example interesting, then I’m sure… Continue Reading

  • Spring Boot: Enhance your logging

    In this post I show how you can tune your Spring Boot application’s logging output – such that it has even more information when you need to troubleshoot. The method is actually so generic that you can apply it to other types of Java applications as well – for example Java EE applications. What you have today… Continue Reading

  • Spring Boot: Enhance your thread dumps

    In this post I show how you can add extra information to your applications’ thread dumps. I will use Spring Boot as an example environment – but the idea is very generic: You can, for example, easily apply this technique to any other Java EE application server environment you may have. Here is an example of an enhanced thread dump output (out of… Continue Reading