Skip to content

Latest commit

 

History

11 Commits

Folders and files

NameName
Last commit message
Last commit date
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Spring Boot Kotlin Reactive Server Example

This repository contains a simple example Spring Boot 3 web server using reactive API's with Kotlin Coroutines.

Used technologies

  • Spring Webflux (reactive REST endpoints)
  • Spring Data R2DBC (reactive database access)
  • H2 in memory database
  • Spring Native GraalVM builds
  • Routes defined with Kotlin DSL (RouteConfig.kt)
  • KotlinX Serialization

Endpoints

  • GET /api/v1/news -> List all news entries in database
  • GET /api/v1/news/{id} -> Get specific news entry by id from database
  • POST /api/v1/news -> Add news entry to database

Build & Run native image

Requirements

  • GraalVM installed and set as environment variable JAVA_HOME (sdkman easiest variant)
  • native-image installed (use gu) and reachable

Steps

  • Build using ./gradlew :nativeCompile
  • Run using ./build/native/nativeCompile/spring-boot-kotlin-reactive-example

Known Issues

  • Native tests not working due to mock dependencies

About

Spring Boot WebFlux with Kotlin compilable to native executable via GraalVM

Topics

Resources

Stars

4 stars

Watchers

1 watching

Forks

Releases

Packages

Contributors

Languages