Hibernate with Kotlin – powered by Spring Boot

Hibernate with Kotlin – powered by Spring Boot

Gradle, Hibernate, Kotlin, Software Development, Spring
Hibernate with Kotlin - powered by Spring Boot In this post, I'd like to demonstrate what you need to consider when using Hibernate with Kotlin. Hibernate is probably the most famous framework for object-relational mapping (ORM) on the JVM, which is used to persistently store Plain Old Java Objects (POJOs) in relational databases. It also implements the Java Persistence API, a specification that "describes the management of relational data" on the JVM. Summary (TL;DR) Put the kotlin-noarg compiler plugin on your build path, it will generate no-argument constructors for your Hibernate entities. In Gradle, add the following to your buildscript dependencies: classpath("org.jetbrains.kotlin:kotlin-noarg:${kotlinVersion}") Further examples can be found here Enable the kotlin-jpa plugin, which works on top of kotlin-noarg by enabling the no-arg generation for Hibernate annotated classes In Gradle, activate…
Read More
Spring WebFlux with Kotlin – Reactive Web

Spring WebFlux with Kotlin – Reactive Web

Functional Programming, Kotlin, Software Development, Spring
Spring 5.0 - even fancier In this article I will show how Spring and Kotlin can be used together. If you’re not familiar with my recent articles, have a look at the other Kotlin related posts here. Besides Kotlin, I’ve always been interested in working with Spring ever since I started with Java back in 2011. I still like the framework although it’s getting bigger and bigger and you often don’t quite know which feature to choose amongst all the alternatives. As the framework itself is growing, the documentation, which is one of best you’ll ever get to see, also is. The thing I like most about Spring is that you can focus on your business logic from day one and don’t have much technical, infrastructural stuff to set up before…
Read More