Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Spring Boot 2 and Kotlin (with Maven)

I want to start a new project using Spring Boot 2 (that’s build snapshots for the time being), which in turn uses Spring Framework 5 (bleeding edge as well). Reason is that Spring 5 is supposed to have much improved Kotlin support, and I would like to use Kotlin.

Now the example that I find use Spring Boot 1.4.3, and of course Gradle, and of course Kotlin-based Gradle file. To be honest, this is too much new technology for me for a single project. I don’t even know how to add a new repository to the Gradle (Kotlin-Gradle!) build script. I would prefer a Maven project, since I’m familiar with that at least, and brand-new Spring and Kotlin will be enough experimentation.

So, how to do this in Maven? What’s the kotlin-spring plugin called there that I see referenced for Gradle?

like image 616
Michael Piefel Avatar asked Jan 13 '17 08:01

Michael Piefel


1 Answers

if you use the start.spring.io project generator (switch to the full version) you can choose spring boot 2 snapshot and kotlin as a language. For both maven and gradle based builds. Everything is in there.

That should be a good starting point :)

like image 187
wemu Avatar answered Nov 15 '22 08:11

wemu