https://github.com/vendelieu/spring-template
Spring Boot basic structure Kotlin based template.
https://github.com/vendelieu/spring-template
arrowkt docker jwt keycloak keycloak-resource-server kotest kotlin mockk oauth2-client spring template
Last synced: 5 months ago
JSON representation
Spring Boot basic structure Kotlin based template.
- Host: GitHub
- URL: https://github.com/vendelieu/spring-template
- Owner: vendelieu
- License: mit
- Created: 2023-11-15T13:40:32.000Z (over 2 years ago)
- Default Branch: master
- Last Pushed: 2026-01-15T13:29:36.000Z (5 months ago)
- Last Synced: 2026-01-15T17:39:15.537Z (5 months ago)
- Topics: arrowkt, docker, jwt, keycloak, keycloak-resource-server, kotest, kotlin, mockk, oauth2-client, spring, template
- Language: Kotlin
- Homepage:
- Size: 516 KB
- Stars: 3
- Watchers: 0
- Forks: 0
- Open Issues: 11
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
## Spring Boot Kotlin Template
This is a Spring Boot template project using Kotlin, Spring Boot 3, Postgres, Flyway, OAuth2, Jwt, ArrowKt, Kotest, and
MockK.
## Requirements
1. Java 11 or higher
2. Gradle 6.8 or higher
3. Kotlin 1.5.21 or higher
4. Postgres 13.3 or higher
**Running the App**
Type the following command in your terminal to run the app:
./gradlew bootRun
**Build and Run with Docker**
Build the project with gradle:
./gradlew build
Build Docker and run docker with docker-compose:
./gradlew build
docker compose -f ./docker up -d
The app will start running at [http://localhost:8080](http://localhost:8080/)
## Rest APIs
The app defines following for APIs.
GET /api/v1/user
{
"code": 200,
"data": {
"id": 1,
"username": "Test",
"name": "ts",
"email": "test@gmail.com",
"created_at": 1700031810575
}
}
GET /api/v1/user/1
{
"code": 200,
"data": {
"id": 1,
"username": "Test",
"name": "ts",
"email": "test@gmail.com",
"created_at": 1700031810575
}
}
POST /api/v1/user
{
"name":"Walter W",
"username":"saymyname"
}
## Features
The project uses a [jOOQ extension plugin](https://github.com/vendelieu/jooq-extension) that extends DAO with interface
that have some helpful functions which often covers the need for repositories, so don't be surprised.
Project also uses a Kotlin idiomatic approach in the error handling process - “exceptions for exceptional cases”, i.e.
business logic and its failures are processed manually and are completely covered without throwing exceptions for every
sneeze and smearing logic out of context.