<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom" xmlns:dc="http://purl.org/dc/elements/1.1/">
  <channel>
    <title>DEV Community: Nicky Mølholm</title>
    <description>The latest articles on DEV Community by Nicky Mølholm (@moelholm).</description>
    <link>https://dev.to/moelholm</link>
    <image>
      <url>https://media2.dev.to/dynamic/image/width=90,height=90,fit=cover,gravity=auto,format=auto/https:%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Fuser%2Fprofile_image%2F11178%2Fme.jpg</url>
      <title>DEV Community: Nicky Mølholm</title>
      <link>https://dev.to/moelholm</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://dev.to/feed/moelholm"/>
    <language>en</language>
    <item>
      <title>Spring Boot: Hello World, Kotlin</title>
      <dc:creator>Nicky Mølholm</dc:creator>
      <pubDate>Tue, 14 Mar 2017 19:13:47 +0000</pubDate>
      <link>https://dev.to/moelholm/spring-boot-hello-world-kotlin</link>
      <guid>https://dev.to/moelholm/spring-boot-hello-world-kotlin</guid>
      <description>&lt;p&gt;In this post I show how you can create a Spring Boot 1.5 application using Kotlin 1.1 (as opposed to typically Java 8 in these times).&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;From moelholm.com: &lt;a href="https://moelholm.com/2017/03/12/spring-boot-hello-world-kotlin/"&gt;Spring Boot: Hello World, Kotlin&lt;/a&gt;&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;The example I have created is a typical "Hello World" example. I have chosen to implement a Spring MVC controller - and an awesome Spring Boot integration test. The Gradle build script uses Kotlin as well (that's pretty cool). You can find the example project in its entirety and real contextÂ &lt;a href="https://github.com/nickymoelholm/smallexamples/tree/master/springboot-kotlin-helloworld"&gt;on GitHub&lt;/a&gt;.&lt;/p&gt;

&lt;p&gt;In this post I also explainÂ some of the Kotlin specificsÂ worthÂ noticing to a typical (Spring) Java developer.Â If you are a Kotlin savvy developer and find that my explanations are wrong or misleadingÂ - then please leave a comment, so that I can fix them. I am by no means a Kotlin specialist (yet!).&lt;/p&gt;

&lt;p&gt;Just want to see the code?&lt;/p&gt;

&lt;h1&gt;
  
  
  1 of 4: The Spring Boot application
&lt;/h1&gt;



&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight kotlin"&gt;&lt;code&gt;&lt;span class="k"&gt;import&lt;/span&gt; &lt;span class="nn"&gt;org.springframework.boot.SpringApplication&lt;/span&gt;
&lt;span class="k"&gt;import&lt;/span&gt; &lt;span class="nn"&gt;org.springframework.boot.autoconfigure.SpringBootApplication&lt;/span&gt;

&lt;span class="nd"&gt;@SpringBootApplication&lt;/span&gt;
&lt;span class="kd"&gt;class&lt;/span&gt; &lt;span class="nc"&gt;Application&lt;/span&gt;

&lt;span class="k"&gt;fun&lt;/span&gt; &lt;span class="nf"&gt;main&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;args&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="nc"&gt;Array&lt;/span&gt;&lt;span class="p"&gt;&amp;lt;&lt;/span&gt;&lt;span class="nc"&gt;String&lt;/span&gt;&lt;span class="p"&gt;&amp;gt;)&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
    &lt;span class="nc"&gt;SpringApplication&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;run&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nc"&gt;Application&lt;/span&gt;&lt;span class="o"&gt;::&lt;/span&gt;&lt;span class="k"&gt;class&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;java&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="p"&gt;*&lt;/span&gt;&lt;span class="n"&gt;args&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;
&lt;span class="p"&gt;}&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Notice that we activate Spring Boot using the normal &lt;code&gt;@SpringBootApplication&lt;/code&gt; annotation. The fun part here, if you will, is that in Kotlin classes doesn't even need to have a body. I guess many of them will have one - but here it is simply not necessary.&lt;/p&gt;

&lt;p&gt;The &lt;code&gt;main&lt;/code&gt; method in Kotlin is a package level function (it is not embedded inside a class).&lt;/p&gt;

&lt;p&gt;We pass &lt;code&gt;Application::class.java&lt;/code&gt; to theÂ &lt;code&gt;run&lt;/code&gt; method. That is not a typoÂ - and itÂ is not aÂ Java source file reference :).Â It is still theÂ &lt;code&gt;Class&lt;/code&gt; object that represents class &lt;code&gt;Application&lt;/code&gt;. If you just pass &lt;code&gt;Application::class&lt;/code&gt; - then you would pass an object of typeÂ &lt;code&gt;KClass&lt;/code&gt;Â - that is Kotlins own representation of what you know as the &lt;code&gt;Class&lt;/code&gt; type from Java!&lt;/p&gt;

&lt;p&gt;The weird &lt;code&gt;*args&lt;/code&gt; is not a pointer - but rather KotlinsÂ &lt;em&gt;spread&lt;/em&gt; operator (theÂ &lt;code&gt;run&lt;/code&gt; method declaresÂ a &lt;em&gt;vararg&lt;/em&gt; parameter).&lt;/p&gt;

&lt;p&gt;( Also: Semicolons are not used - no biggie for me though )&lt;/p&gt;

&lt;h1&gt;
  
  
  2 of 4: The controller
&lt;/h1&gt;



&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight kotlin"&gt;&lt;code&gt;&lt;span class="k"&gt;import&lt;/span&gt; &lt;span class="nn"&gt;org.springframework.web.bind.annotation.GetMapping&lt;/span&gt;
&lt;span class="k"&gt;import&lt;/span&gt; &lt;span class="nn"&gt;org.springframework.web.bind.annotation.PathVariable&lt;/span&gt;
&lt;span class="k"&gt;import&lt;/span&gt; &lt;span class="nn"&gt;org.springframework.web.bind.annotation.RestController&lt;/span&gt;

&lt;span class="nd"&gt;@RestController&lt;/span&gt;
&lt;span class="kd"&gt;class&lt;/span&gt; &lt;span class="nc"&gt;GreetingController&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;

 &lt;span class="nd"&gt;@GetMapping&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="s"&gt;"/hello/{name}"&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;
 &lt;span class="k"&gt;fun&lt;/span&gt; &lt;span class="nf"&gt;get&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nd"&gt;@PathVariable&lt;/span&gt; &lt;span class="n"&gt;name&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="nc"&gt;String&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="p"&gt;=&lt;/span&gt; &lt;span class="s"&gt;"Hello, $name"&lt;/span&gt;

&lt;span class="p"&gt;}&lt;/span&gt;

&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;This is a typical Spring MVC controller. I betÂ you can recognise &lt;code&gt;@RestController&lt;/code&gt;, &lt;code&gt;@GetMapping&lt;/code&gt;Â and &lt;code&gt;@PathVariable&lt;/code&gt; (if you are an experiencedÂ Spring Java developer).&lt;/p&gt;

&lt;p&gt;Notice that the functionÂ is prefixed withÂ &lt;code&gt;fun&lt;/code&gt; here. It looks like a variable assignment, but it isn't. What you see there is an implicit &lt;code&gt;return&lt;/code&gt; statement of the string &lt;em&gt;Hello, $name&lt;/em&gt;. The function could have had a body and aÂ &lt;code&gt;return&lt;/code&gt; statement instead - but it isn't necessary in this case.&lt;/p&gt;

&lt;p&gt;Notice that the the function doesn't have an explicit return type. You could have put &lt;code&gt;: String&lt;/code&gt; just before the equals sign. But KotlinÂ can infer it - so not necessary in this case either.&lt;/p&gt;

&lt;p&gt;The &lt;code&gt;$name&lt;/code&gt; argument is replaced with the contents of the &lt;code&gt;name&lt;/code&gt; parameter - a demonstration of Kotlins support for &lt;em&gt;string interpolation&lt;/em&gt;. This, almostÂ insignificant feature, would have a huge effect on many of the Java projects I have seen!&lt;/p&gt;

&lt;h1&gt;
  
  
  3 of 4: The integration test
&lt;/h1&gt;



&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight kotlin"&gt;&lt;code&gt;&lt;span class="k"&gt;import&lt;/span&gt; &lt;span class="nn"&gt;org.assertj.core.api.Assertions.assertThat&lt;/span&gt;
&lt;span class="k"&gt;import&lt;/span&gt; &lt;span class="nn"&gt;org.junit.Test&lt;/span&gt;
&lt;span class="k"&gt;import&lt;/span&gt; &lt;span class="nn"&gt;org.junit.runner.RunWith&lt;/span&gt;
&lt;span class="k"&gt;import&lt;/span&gt; &lt;span class="nn"&gt;org.springframework.beans.factory.annotation.Autowired&lt;/span&gt;
&lt;span class="k"&gt;import&lt;/span&gt; &lt;span class="nn"&gt;org.springframework.boot.test.context.SpringBootTest&lt;/span&gt;
&lt;span class="k"&gt;import&lt;/span&gt; &lt;span class="nn"&gt;org.springframework.boot.test.web.client.TestRestTemplate&lt;/span&gt;
&lt;span class="k"&gt;import&lt;/span&gt; &lt;span class="nn"&gt;org.springframework.test.context.junit4.SpringRunner&lt;/span&gt;

&lt;span class="nd"&gt;@RunWith&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nc"&gt;SpringRunner&lt;/span&gt;&lt;span class="o"&gt;::&lt;/span&gt;&lt;span class="k"&gt;class&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;
&lt;span class="nd"&gt;@SpringBootTest&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;webEnvironment&lt;/span&gt; &lt;span class="p"&gt;=&lt;/span&gt; &lt;span class="nc"&gt;SpringBootTest&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nc"&gt;WebEnvironment&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nc"&gt;RANDOM_PORT&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;
&lt;span class="kd"&gt;class&lt;/span&gt; &lt;span class="nc"&gt;GreetingControllerIntegrationTests&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;

    &lt;span class="nd"&gt;@Autowired&lt;/span&gt;
    &lt;span class="k"&gt;lateinit&lt;/span&gt; &lt;span class="kd"&gt;var&lt;/span&gt; &lt;span class="py"&gt;restTemplate&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="nc"&gt;TestRestTemplate&lt;/span&gt;

    &lt;span class="nd"&gt;@Test&lt;/span&gt;
    &lt;span class="k"&gt;fun&lt;/span&gt; &lt;span class="nf"&gt;`GET&lt;/span&gt; &lt;span class="k"&gt;when&lt;/span&gt; &lt;span class="n"&gt;given&lt;/span&gt; &lt;span class="nc"&gt;Duke&lt;/span&gt; &lt;span class="n"&gt;then&lt;/span&gt; &lt;span class="n"&gt;returns&lt;/span&gt; &lt;span class="s"&gt;"Hello, Duke"&lt;/span&gt;&lt;span class="err"&gt;`&lt;/span&gt;&lt;span class="p"&gt;()&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;

        &lt;span class="c1"&gt;// Given&lt;/span&gt;
        &lt;span class="kd"&gt;val&lt;/span&gt; &lt;span class="py"&gt;name&lt;/span&gt; &lt;span class="p"&gt;=&lt;/span&gt; &lt;span class="s"&gt;"Duke"&lt;/span&gt;

        &lt;span class="c1"&gt;// When&lt;/span&gt;
        &lt;span class="kd"&gt;val&lt;/span&gt; &lt;span class="py"&gt;body&lt;/span&gt; &lt;span class="p"&gt;=&lt;/span&gt; &lt;span class="n"&gt;restTemplate&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;getForObject&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="s"&gt;"/hello/{name}"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="nc"&gt;String&lt;/span&gt;&lt;span class="o"&gt;::&lt;/span&gt;&lt;span class="k"&gt;class&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;java&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="n"&gt;name&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;

        &lt;span class="c1"&gt;// Then&lt;/span&gt;
        &lt;span class="nf"&gt;assertThat&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;body&lt;/span&gt;&lt;span class="p"&gt;).&lt;/span&gt;&lt;span class="nf"&gt;isEqualTo&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="s"&gt;"Hello, $name"&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;

    &lt;span class="p"&gt;}&lt;/span&gt;

&lt;span class="p"&gt;}&lt;/span&gt;

&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Worth noticing here is the weirdÂ &lt;code&gt;lateinit&lt;/code&gt; modifier [lateinit]. So this is the deal:Â Kotlin normally assume that the memberÂ is non-null and therefore it must be assigned explicitly in the constructor to a non-null value. But since the &lt;em&gt;Spring TestContext Framework&lt;/em&gt; takes care of the injection after the constructor has run, then we need to allow it explicitly, using the &lt;code&gt;lateinit&lt;/code&gt; modifier.&lt;/p&gt;

&lt;p&gt;Another interesting element is the &lt;code&gt;@Test&lt;/code&gt; function name: I actually started with the name &lt;code&gt;get_whenInvokedWithDuke_thenReturnsHelloDuke&lt;/code&gt;. But I updated the example after a tip from one of the readers: Using backticks around function names allow us to provide sentence-like function names. Super nice for naming tests if you ask me.&lt;/p&gt;

&lt;p&gt;In the &lt;code&gt;@Test&lt;/code&gt; itself: notice the use ofÂ &lt;code&gt;val&lt;/code&gt;. It's like Java's &lt;code&gt;final&lt;/code&gt;Â modifier (in context of variables). Kotlin's type inference means that we aren'tÂ forced to write down the type (&lt;code&gt;String&lt;/code&gt;).&lt;/p&gt;

&lt;p&gt;So.... I think this seems super nice. The code is not overly verbose with type information. And at least for this Hello World case I think it is perfectly fine. I'm also pretty happy with the string interpolation again :) ... (in Java land I tend to use &lt;code&gt;String.format("stuff...%s", varhere)&lt;/code&gt; - rather annoying).&lt;/p&gt;

&lt;h1&gt;
  
  
  4 of 4: The Gradle script
&lt;/h1&gt;

&lt;p&gt;I have been using Gradle as a drop-in replacement for Maven for the last 1.5 year. For that periodÂ I've always used Groovy as the programming language in my Gradle scripts. And I kind of like that - but also, I must admit that the IDE assistance isn't super optimalÂ (even in IntelliJ which I use now).&lt;/p&gt;

&lt;p&gt;Then as I wasÂ browsing Kotlin features etc, I found out that the Gradle guys are working on supporting Kotlin as another programming language in scripts [gradlekotlin]. And not only that: they are working on making Kotlin the language of choice for developing Gradle plugins [gradlescriptkotlin] !&lt;/p&gt;

&lt;p&gt;Okay - the code:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight groovy"&gt;&lt;code&gt;&lt;span class="n"&gt;buildscript&lt;/span&gt; &lt;span class="o"&gt;{&lt;/span&gt;

    &lt;span class="n"&gt;val&lt;/span&gt; &lt;span class="n"&gt;springBootVersion&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="s2"&gt;"1.5.2.RELEASE"&lt;/span&gt;
    &lt;span class="n"&gt;var&lt;/span&gt; &lt;span class="nl"&gt;kotlinVersion:&lt;/span&gt; &lt;span class="n"&gt;String&lt;/span&gt; &lt;span class="n"&gt;by&lt;/span&gt; &lt;span class="n"&gt;extra&lt;/span&gt;
    &lt;span class="n"&gt;kotlinVersion&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="s2"&gt;"1.1.0"&lt;/span&gt;

    &lt;span class="n"&gt;repositories&lt;/span&gt; &lt;span class="o"&gt;{&lt;/span&gt;
        &lt;span class="n"&gt;mavenCentral&lt;/span&gt;&lt;span class="o"&gt;()&lt;/span&gt;
    &lt;span class="o"&gt;}&lt;/span&gt;

    &lt;span class="n"&gt;dependencies&lt;/span&gt; &lt;span class="o"&gt;{&lt;/span&gt;
        &lt;span class="n"&gt;classpath&lt;/span&gt;&lt;span class="o"&gt;(&lt;/span&gt;&lt;span class="s2"&gt;"org.springframework.boot:spring-boot-gradle-plugin:$springBootVersion"&lt;/span&gt;&lt;span class="o"&gt;)&lt;/span&gt;
        &lt;span class="n"&gt;classpath&lt;/span&gt;&lt;span class="o"&gt;(&lt;/span&gt;&lt;span class="s2"&gt;"org.jetbrains.kotlin:kotlin-gradle-plugin:$kotlinVersion"&lt;/span&gt;&lt;span class="o"&gt;)&lt;/span&gt;
        &lt;span class="n"&gt;classpath&lt;/span&gt;&lt;span class="o"&gt;(&lt;/span&gt;&lt;span class="s2"&gt;"org.jetbrains.kotlin:kotlin-allopen:$kotlinVersion"&lt;/span&gt;&lt;span class="o"&gt;)&lt;/span&gt;
    &lt;span class="o"&gt;}&lt;/span&gt;

&lt;span class="o"&gt;}&lt;/span&gt;

&lt;span class="n"&gt;val&lt;/span&gt; &lt;span class="nl"&gt;kotlinVersion:&lt;/span&gt; &lt;span class="n"&gt;String&lt;/span&gt; &lt;span class="n"&gt;by&lt;/span&gt; &lt;span class="n"&gt;extra&lt;/span&gt;

&lt;span class="n"&gt;apply&lt;/span&gt; &lt;span class="o"&gt;{&lt;/span&gt;
    &lt;span class="n"&gt;plugin&lt;/span&gt;&lt;span class="o"&gt;(&lt;/span&gt;&lt;span class="s2"&gt;"kotlin"&lt;/span&gt;&lt;span class="o"&gt;)&lt;/span&gt;
    &lt;span class="n"&gt;plugin&lt;/span&gt;&lt;span class="o"&gt;(&lt;/span&gt;&lt;span class="s2"&gt;"kotlin-spring"&lt;/span&gt;&lt;span class="o"&gt;)&lt;/span&gt;
    &lt;span class="n"&gt;plugin&lt;/span&gt;&lt;span class="o"&gt;(&lt;/span&gt;&lt;span class="s2"&gt;"org.springframework.boot"&lt;/span&gt;&lt;span class="o"&gt;)&lt;/span&gt;
&lt;span class="o"&gt;}&lt;/span&gt;

&lt;span class="n"&gt;repositories&lt;/span&gt; &lt;span class="o"&gt;{&lt;/span&gt;
    &lt;span class="n"&gt;mavenCentral&lt;/span&gt;&lt;span class="o"&gt;()&lt;/span&gt;
&lt;span class="o"&gt;}&lt;/span&gt;

&lt;span class="n"&gt;dependencies&lt;/span&gt; &lt;span class="o"&gt;{&lt;/span&gt;
    &lt;span class="n"&gt;compile&lt;/span&gt;&lt;span class="o"&gt;(&lt;/span&gt;&lt;span class="s2"&gt;"org.jetbrains.kotlin:kotlin-stdlib:$kotlinVersion"&lt;/span&gt;&lt;span class="o"&gt;)&lt;/span&gt;
    &lt;span class="n"&gt;compile&lt;/span&gt;&lt;span class="o"&gt;(&lt;/span&gt;&lt;span class="s2"&gt;"org.jetbrains.kotlin:kotlin-reflect:$kotlinVersion"&lt;/span&gt;&lt;span class="o"&gt;)&lt;/span&gt;
    &lt;span class="n"&gt;compile&lt;/span&gt;&lt;span class="o"&gt;(&lt;/span&gt;&lt;span class="s2"&gt;"org.springframework.boot:spring-boot-starter-web"&lt;/span&gt;&lt;span class="o"&gt;)&lt;/span&gt;
    &lt;span class="n"&gt;testCompile&lt;/span&gt;&lt;span class="o"&gt;(&lt;/span&gt;&lt;span class="s2"&gt;"org.springframework.boot:spring-boot-starter-test"&lt;/span&gt;&lt;span class="o"&gt;)&lt;/span&gt;
&lt;span class="o"&gt;}&lt;/span&gt;

&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Looks like the ordinary Groovy based script in my opinion. That's nice - so no big re-adjustment.&lt;/p&gt;

&lt;p&gt;I am quite certain that youÂ should use an up-to-date version of IntelliJ to get a decent IDE experience with Kotlin based build scripts. For me it seems okay (&lt;em&gt;IntelliJ IDEA 2016.3.5&lt;/em&gt;) - but the content assist isÂ extremely slow. I guess that will be nailed properly at some point. Also I still think I get a bunch of weird suggestions in my content assist in the different blocks.&lt;/p&gt;

&lt;h1&gt;
  
  
  Motivation: why Kotlin?
&lt;/h1&gt;

&lt;p&gt;I love Java for it's simplicity - and I know it by heart.&lt;/p&gt;

&lt;p&gt;But, to be honest I feel there are a bunch of nice features in most of the other popular languages today that Java simply doesn't have. Kotlin is one of these new JVM languages - and it has a truly remarkable feature list. Head over to the reference manual and browse through it [kotlinreference]; I promise that you will be clapping your hands as you read through the individual features.&lt;/p&gt;

&lt;p&gt;Lately I've noticed how Pivotal embraces Kotlin - through examples,Â public demo sessions (fx byÂ our favorite rockstar, Starbuxman [starbuxman]) and nonetheless by making the core Spring Framework seamless to use from Kotlin [springkotlin]. Being an avid Spring Boot fan that got my attention.&lt;/p&gt;

&lt;p&gt;I haven't tried Kotlin on a real world project yet. But I definitely hope that I will get the chance very soon.&lt;/p&gt;

&lt;h1&gt;
  
  
  References
&lt;/h1&gt;

&lt;p&gt;&lt;em&gt;[kotlinreference] :Â Kotlin Reference&lt;/em&gt;&lt;br&gt;
&lt;a href="https://kotlinlang.org/docs/reference/"&gt;https://kotlinlang.org/docs/reference/&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;em&gt;[starbuxman] :Â Spring Tips: The Kotlin Programming language&lt;/em&gt;&lt;br&gt;
&lt;a href="https://spring.io/blog/2016/10/19/spring-tips-the-kotlin-programming-language"&gt;https://spring.io/blog/2016/10/19/spring-tips-the-kotlin-programming-language&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;em&gt;[springkotlin] :Â Introducing Kotlin support in Spring Framework 5.0&lt;/em&gt;&lt;br&gt;
&lt;a href="https://spring.io/blog/2017/01/04/introducing-kotlin-support-in-spring-framework-5-0"&gt;https://spring.io/blog/2017/01/04/introducing-kotlin-support-in-spring-framework-5-0&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;em&gt;[lateinit]: The Kotlin lateinit modifier:&lt;/em&gt;&lt;br&gt;
&lt;a href="https://kotlinlang.org/docs/reference/properties.html#late-initialized-properties"&gt;https://kotlinlang.org/docs/reference/properties.html#late-initialized-properties&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;em&gt;[gradlekotlin]: Kotlin Meets Gradle&lt;/em&gt;&lt;br&gt;
&lt;a href="https://blog.gradle.org/kotlin-meets-gradle"&gt;https://blog.gradle.org/kotlin-meets-gradle&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;em&gt;[gradlescriptkotlin]: Gradle Script Kotlin - FAQ&lt;/em&gt;&lt;br&gt;
&lt;a href="https://github.com/gradle/gradle-script-kotlin/wiki/Frequently-Asked-Questions#in-what-language-should-i-develop-my-plugins"&gt;https://github.com/gradle/gradle-script-kotlin/wiki/Frequently-Asked-Questions#in-what-language-should-i-develop-my-plugins&lt;/a&gt;&lt;/p&gt;

</description>
      <category>spring</category>
      <category>kotlin</category>
      <category>java</category>
      <category>springboot</category>
    </item>
  </channel>
</rss>
