I just published a blog post on the codecentric blog site: How to write a Kotlin DSL – e.g. for Apache Kafka and in German: Wie schreibt man eine Kotlin DSL – z.B. für Apache Kafka? Edit 2. May 2023: After the relaunch of the codecentric website, the english version has been lost it seems.
what’s it all about In this post I show how to implement an annotation-based Logger injection in Spring when writing the application with Kotlin. The used technique is quite far from new, basically what I do is implement a BeanPostProcessor which scans the properties of the beans for fields annotated with a custom annotation and sets these fields to a Logger instance. Examples how to implement this in Java can be found on the web, here I show the Kotlin version.
Intro In this post I show how to combine some language / frameworks and libraries / tools to build a web-based scalable chat application. I chose the following combination of tools: Kotlin as implementation language Vaadin for the web-based application Apache Kafka as the message backend Spring-Boot to get all together and running As I am bad in creating cool names for projects I just put together the first letters of the used tools and named this whole thing kovasbak.