Java

Redis Testcontainer with Kotlin and Spring Boot

I found lots of samples for creating a redis testcontainer in Spring Boot tests. But none of them really worked. Below is a working base class with a sample. It is based on Spring Boot 3.1.2 and latest testcontainer version at time of writing (“org.testcontainers:testcontainers:1.18.3”). The testcontainer-redis versions were avoided on purpose because they were

Redis Testcontainer with Kotlin and Spring Boot Read More »

java.lang.ClassNotFoundException: javax.annotation.PostConstruct

When upgrading to the latest tools and libraries in a Spring Boot application with OpenAPI code generator in place the OpenAPI Kotlin generator introduced jakarta.annotation:jakarta.annotation-api. But with this in place the application refused to start with something like org.springframework.context.ApplicationContextException: Unable to start web server; nested exception is org.springframework.boot.web.server.WebServerException: Unable to start embedded Tomcat…Caused by: java.lang.IllegalStateException:

java.lang.ClassNotFoundException: javax.annotation.PostConstruct Read More »

Lombok and log4shell

Project lombok has become a defacto standard in close to every Java project I see. Because of this I want to also write about the ongoing log4j problems as described under https://blog.coffeebeans.at/archives/1709. The annotation @Log4j allows to create a log4j logger field in the annotated class. This of course implicates that your project is using

Lombok and log4shell Read More »

gradle status plugin

I’ve started to write a simple plugin to analyse gradle projects and send dependency information to a central server. This way I want to get insight into all projects in the company and check if there is some log4j2 dependency below 2.16.0. You can find the code under https://github.com/mbogner/gradle-status-plugin. The plugin was accepted and is

gradle status plugin Read More »