Skip to content

jobrunr/example-spring-kotlin

Repository files navigation

JobRunr Spring Boot 3 + Kotlin(x) example

This repository shows an example how you can integrate JobRunr, Spring Boot 3, and Kotlin JSON Serialization.

If you are looking for an example on how to integrate JobRunr into a Java Spring Boot 3 project, please take a look at our pure Java example project: https://github.com/jobrunr/example-spring/.

About this project

This project shows how to let Spring Boot 3 + Kotlin + JobRunr play along nicely.

For more information on how JobRunr integrates with Spring, please see our extension documentation located at https://www.jobrunr.io/en/documentation/configuration/spring/.

The build.gradle file listing the dependencies is the most important one to inspect here, that lists the following groups of dependencies:

  1. Spring Boot dependencies: your usual: just the jobrunr-spring-boot-3-starter and an optional one for testing.
  2. Kotlin + kotlinx-serialization dependencies. Note that you need core, core-jvm, json, and json-jvm because of Spring.
  3. DataSources: H2 that helps to create a Spring dataSource bean needed for JobRunr.
  4. JobRunr Kotlin compatibility + Spring compatibility.

If you're unsure on which versions of kotlinx-serialization-json and Kotlin to pick, see our serialization support announcement at https://www.jobrunr.io/en/guides/migration/v8/#kotlin-serialisation-support. Only JobRunr v8 and up support Kotlin serialization.

How to run this project

  1. clone the project
  2. Run the bootRun Gradle task or let your favourite IDE do the heavy lifting for you
  3. Open your favorite browser:

About

An example repository for Spring Boot 3 + Kotlin + kotlinx.serialization

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages