• Spring: Please ignore my mocks

    If you are using the core Spring Framework (that is, not Spring Boot), then you may have encountered a problem where Spring doesn’t seem to completely ignore mocked beans in your tests: Perhaps Spring attempts to inject beans into them or run your @PostConstruct lifecycle methods. In this post I present that problem together with… Continue Reading

  • Kotlin: Understanding properties

    In this post I am going to look into Kotlin properties [1] from a Java developers perspective. By a few examples and by looking into the generated code. I have created an example project on GitHub. You will find a few examples of how to declare properties – and for each of them, also identical… Continue Reading

  • 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 interesting to a typical Java 8 developer. Also, I hope you will see that: Spring… Continue Reading

  • Java EE: Hello World, Kotlin

    Are you a savvy Java EE 7 application developer? My bet is then, that you are using Java 7/8 for developing your favorite components (EJBs, CDI beans etc). In this post I am going to show how you can develop a Java EE 7 application using Kotlin 1.1 instead. It is very very (!) easy:… Continue Reading

  • Spring Boot: Hello World, Kotlin

    In this post I show how you can create a Spring Boot 1.5 application using Kotlin 1.1 (as opposed to typically Java 8 in these times). The example I’ve created is a typical “Hello World” example. I have chosen to implement a Spring MVC controller – and an awesome Spring Boot integration test. The Gradle… Continue Reading

  • 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 is how to get that… It’s a one liner in Gradle: And a five liner… Continue Reading