


And finally, we’ll add some dummy classes, package our application, and test if everything works as expected. We’ll then add the kotlin-maven-plugin to handle Kotlin as well.

We’ll first create a project for Java sources only. It’s pretty straight forward, but in Kotlin there are a few different ways to solve the problem of defining a logger. Introduction In this quick tutorial, we’ll see how to set up a Maven project handling both Java and Kotlin sources. In Java, having a static property for something like a Logger is a very common use case. It was our first Kotlin migration and getting to know the Kotlin language better was/is a lot of fun, but also confusing at times. While doing so we’ve learned quite a few things along the way and I created some notes that I wanted to share in case somebody else runs into the same issues. Development Migrating a Spring Boot service from Java 11 to KotlinĪt my current project we’ve just finished migrating a Spring Boot 2.1.x service from Java 11 to Kotlin. Differences Between Kotlin and Java Syntax One of the most significant differences between Kotlin and Java is the syntax.
