In this PR, I'm adding the Kotlin alternatives to Java samples in the Spring Boot reference. They are mostly translated with the IntelliJ IDEA built-in J2K converter and later adjusted manually for a more Kotlin-idiomatic look.

Feel free to change the new samples as you see best or ask me to do this.

Regards, Pavel Kotlin Technical Writer

Comment From: pivotal-cla

@p7nov Please sign the Contributor License Agreement!

Click here to manually synchronize the status of this Pull Request.

See the FAQ for frequently asked questions.

Comment From: pivotal-cla

@p7nov Thank you for signing the Contributor License Agreement!

Comment From: snicoll

Thank you very much for this contribution. There is some related work that needs to happen before we can merge this. Our asciidoctor backend automatically removes imports, package statement and copyright headers but that doesn't work for Kotlin source code. I've created https://github.com/spring-io/spring-asciidoctor-backends/issues/55

Comment From: philwebb

Thanks very much for this amazing PR @p7nov! I've merged it to 2.7.x and main.

I made a few changes to our asciidoctor backend to support Kotlin and to also automate the discovery of Kotlin source files. I've also tweaked a few things in this polish commit. I hope the updates are OK.

The new docs should appear here once CI has completed a build.

Thanks again!