If you’ve been spring boot for a while, you’re probably familiar with Spring’s bootJar functionality that lets you create a new executable “fat jar” with all its dependencies pre defined. However, while I was building a kotlin app using http4k, which doesn’t come with any such built in tooling I had to resort to using the shadowJar plugin to build a fat jar.
However post deploy, the app stopped starting up and I noticed the following error in the logs:
Recently on my usual #githunt prowl I came across a new promising http library called http4k. The library is based on the philosophy of Application as Function based on the twitter paper Your Server as a Function and promises a lightweight a server toolkit alongwith a very modular approach to adding functionality on top of the core set of capabilities built in. But the best part of all, http4k is written in pure Kotlin and follows a consistent functional approach in handling http services.