Spring supports for Kotlin

Due to its stunning features, Kotlin has rapidly grown in popularity, and many frameworks have started supporting it. The Spring Framework has allowed the development of Spring applications with Kotlin since version 5. Though Kotlin is fully interoperable with Java, you can write an application with pure and fully idiomatic Kotlin code. The diverse range of Kotlin features enhances productivity and combines well with Spring for application development.

As we have seen, the extension function in Kotlin is a non-intrusive way of providing a better alternative to the utility class or creating a class hierarchy for adding new features. Spring has used this feature to apply new Kotlin specific capabilities to existing Spring APIs. It is mainly used for dependency management. In the same way, Spring has also made framework APIs null safe to take full advantage of Kotlin.

Even Spring Boot has first-class Kotlin support, starting from version 2.x. This means you can write Spring-based applications in Kotlin as if Spring was a native framework of Kotlin. The current version of Kotlin released in October 2018 is 1.3, and Spring supports Kotlin 1.1 and higher. 

..................Content has been hidden....................

You can't read the all page of ebook, please click here login for view all page.
Reset
3.145.186.173