Simple Todo list API using Spring-Boot, Webflux, Kotlin, Coroutines, & PostgreSQL

Overview

Todo List (Spring Boot)


Tech Stack

Features

  • Mockk + Spring Mockk to mock beans.
  • Kotest assertions provides fluent Kotlin DSL API for assertions in tests.
  • Spring Doc to expose OpenAPI via Swagger at http://localhost:9090/actuator/webjars/swagger-ui/index.html
  • Docker Compose to serve a running Postgres when running the application.
  • Test persistence with a Postgres database running in TestContainers.

Prerequisites

Libraries

Troubleshooting

Ensure Java Home variable is set
echo $JAVA_HOME

Should see

/Library/Java/JavaVirtualMachines/jdk-17.0.1.jdk/Contents/Home

If not, you either don't have it downloaded, or Java Home variable is not set.

Ensure Java version is downloaded
/usr/libexec/java_home -V

Should see installed JDKs:

17.0.1 (x86_64) "Oracle Corporation" - "Java SE 17.0.1" /Library/Java/JavaVirtualMachines/jdk-17.0.1.jdk/Contents/Home
16.0.1 (x86_64) "Oracle Corporation" - "OpenJDK 16.0.1" /Users/user/Library/Java/JavaVirtualMachines/openjdk-16.0.1/Contents/Home
11.0.13 (x86_64) "Oracle Corporation" - "Java SE 11.0.13" /Library/Java/JavaVirtualMachines/jdk-11.0.13.jdk/Contents/Home
...

If not found, have not downloaded the JDK properly.

Ensure correct v17 is showing
/usr/libexec/java_home -v 17

Should see

/Library/Java/JavaVirtualMachines/jdk-17.0.1.jdk/Contents/Home

If you see a non-Oracle JDK, like open JDK, you need to uninstall it first.

Set Java Home variable

Find out what shell version you're using:

echo $SHELL

If you're using ZSH: you ought to be updating ~/.zshrc else ~/.bash_profile for the following steps.

Update your profile:

[emacs/vim/atom] ~/.zshrc

Add the following line:

export JAVA_HOME=$(/usr/libexec/java_home -v 17)

Update shell profile

source ~/.zshrc

Build & Run Project

Clean Project
./gradlew clean
Build Project
./gradlew build
Run Project
./gradlew bootRun --args='--spring.profiles.active=dev'

// or
./gradlew build
java -jar build/todo-xxxx.jar 
You might also like...
Grocery - A simple CRUD Project using Spring Boot, Kotlin and MongoDB

Grocery - A simple CRUD Project using Spring Boot, Kotlin and MongoDB

API Rest With Kotlin And Spring Boot

##API REST WITH KOTLIN AND SPRING BOOT GET Url: http://localhost:8080/customers Response (Status Code: 200 Ok) { "_embedded": { "customer

Ejemplo de API Rest Blog con Spring Boot + Kotlin + Gradle
Ejemplo de API Rest Blog con Spring Boot + Kotlin + Gradle

Blog Ejemplo de API Rest Blog con Spring Boot 2.7.3 + Kotlin + Gradle + Java 17 El objetivo es que pueda servir como guía para el aprendizaje, lo más

A sample skeleton backend app built using Spring Boot kotlin, Expedia Kotlin Graphql, Reactive Web that can be deployed to Google App Engine Flexible environmennt

spring-kotlin-gql-gae This is a sample skeleton of a backend app that was built using: Spring Boot(Kotlin) Reactive Web Sprinng Data R2DBC with MYSQL

Spring Boot API for Modern Warfare 2 Dedicated Servers

Spring Boot API for Modern Warfare 2 Dedicated Servers

Push notification application using One Signal + Spring Boot + Kotlin

Spring Boot push notification system using One Signal This project was created to demonstrate a simple application built with Kotlin + Spring Boot inc

Spring Boot built using Kotlin, H2, Postgres, Hibernate and JPA

Spring-Boot-Kotlin-Sample Spring Boot built using Kotlin, H2, Postgres, Hibernate and JPA Getting Started Reference Documentation For further referenc

A Modern Kotlin-Ktor RESTful API example. Connects to a PostgreSQL database and uses Exposed framework for database operations.
A Modern Kotlin-Ktor RESTful API example. Connects to a PostgreSQL database and uses Exposed framework for database operations.

kotlin-ktor-rest-api A Modern Kotlin-Ktor RESTful API example. Connects to a PostgreSQL database and uses Exposed framework for database operations. F

A generic library for quick development in Spring Boot using Java Generics.
A generic library for quick development in Spring Boot using Java Generics.

slinky Now in Kotlin! A generic library for quick development in Spring Boot using Java Generics. Why "slinky"? A slinky is a precompressed helical sp

Comments
  • CRUD of Todos

    CRUD of Todos

    Todo Model:

    • UUID
    • Title (String)
    • Content (String)
    • Create Date (ISO date time format)(UTC) (String)

    Create endpoints to do Create, Read, Update, & Delete.

    opened by seljabali 4
  • Add Build Types

    Add Build Types

    Add 3 build types:

    • Production
    • Staging
    • Development

    Each build type allows configuration of:

    • Database
      • URL
      • Name
      • Password
    • Allowed origin URL
    • Base URL of project
    opened by seljabali 1
  • Refactor project to use modules

    Refactor project to use modules

    • Database

      • Database models
      • Database Repositories
    • Network (networking models)

      • Network models
      • Network Repositories
    • App (controllers)

      • Depends on Database & Network
    opened by seljabali 1
Owner
Sami Eljabali
Sami Eljabali
Cargo service: REST API, Spring Boot, Kotlin, JDBC, PostgreSQL

cargo-jdbc Cargo service, training project with Spring Boot, JDBC and Kotlin. To

Valeriy Emelyanov 1 Dec 7, 2022
Spring Boot Webflux RDBMS Sample App

R2DBC Spring Boot Webflux Sample Project generate schema (DDL script) h2-console (Web based database management console) WebFlux and r2dbc is not supp

Can Yaman 0 Nov 7, 2021
Event-driven application uses React, reactive Spring Boot WebFlux, R2DBC, MySQL and Liquibase

Product delivery Event-driven application uses React, reactive Spring Boot WebFlux, R2DBC, MySQL and Liquibase Status: IN PROGRESS if [[ "" != `docker

Maksim Kostromin 2 Aug 17, 2022
Spring-kotlin - Learning API Rest with Kotlin, Spring and PostgreSQL

Kotlin, Spring, PostgreSQL and Liquibase Database Migrations Learning Kotlin for

Andre L S Ferreira 2 Feb 14, 2022
Reactive setup with Spring WebFlux , Kotlin, Postgres and Spring Data R2DBC

Reactive Spring with Kotlin and Pg Spring WebFlux with Netty instead of Spring Web with Tomcat Mono and Flux in all layers (controller, service, repo)

Bimal Raj Gyawali 7 Dec 9, 2022
This repository demonstrates Spring GraphQL + RSocket + WebFlux + R2DBC + H2

Reactive GraphQL with Spring This repository demonstrates Spring GraphQL + RSocket + WebFlux + R2DBC + H2 O__ +-----------+

Maksim Kostromin 1 Nov 27, 2021
Michal Kubele 0 Jan 6, 2022
Demo Spting REST Service on Kotlin. Works with PostgreSQL via Spring Data. Data initialization provided by liquibase

Spring Boot REST API with Kotlin Spring Boot REST API service. Spring Data with PostgreSQL. Data initialization with Liquibase. Swagger UI Reference D

null 0 Jun 10, 2022
API for a library using Kotlin, Spring-boot and covered by test

Library API This API is to create Books and be able to borrow from them I'm using: Spring Boot version 2.5.6 Kotlin 1.5.31 Java 11 I'm implementing us

Daniel Queiroz 1 Nov 5, 2021
Spring-graphql-getting-started - Spring for GraphQL provides support for Spring applications built on GraphQL Java

Getting Started with GraphQL and Spring Boot Spring for GraphQL provides support

Shinya 0 Feb 2, 2022