Skip to content

Repository files navigation

spring-boot-webflux-kotlin-coroutine

GitHub Workflow Status (with branch) codecov

A sample of Spring boot WebFlux and Kotlin Coroutine with Handler and Router. In this sample, implementing Todo model, handler and router with database (PostgreSQL) testing.

Reqirements

  • Java 25 (managed by mise)
  • Docker 4.37.2 >=
  • gradle 9.5.1 (provided by the Gradle wrapper)
  • PostgreSQL 18 (spun up by docker-compose, and by Testcontainers for tests)

Spring Boot 4.1 / Kotlin 2.3 / Spring Framework 7.

Getting Started

Please make sure Docker is up and running.

Toolchain setup

The JDK is pinned in mise.toml. Install it with:

$ mise trust
$ mise install

mise then puts Java 25 on the PATH and sets JAVA_HOME for this directory.

Production

$ make run

application.yml will be referred for the configuration. This command does

  • Build Docker image with the implementation
  • Spin up Database and Springboot application (this application) by docker-compose

Development

$ make devDB
$ make devBoot

application-local.yml will be referred for the configuration.

make devDB only spins up Database, and make devBoot run this application by development mode via gradle.

How to run test

$ gradle test --info

Clean up environment

$ make clean

This command cleans up database.

OpenAPI

How to access Swagger UI

http://localhost:8080/webjars/swagger-ui/index.html

Tips

Makefile commands

You can run all commands by using Makefile. All available commands is displayed by typing,

$ make help

About

🛠️ A sample of Spring boot WebFlux and Kotlin Coroutine with Handler and Router

Topics

Resources

Stars

8 stars

Watchers

0 watching

Forks

Releases

Packages

Used by

Contributors

Languages