This repository is a minimal Kotlin + Spring Boot + Vaadin template using Gradle. Use it to bootstrap a new application quickly and consistently.
- JDK 21 (or a compatible distribution such as Temurin 21)
- Gradle Wrapper (included) — no need to install Gradle
- Docker (optional, for Docker/Compose based workflows)
- Kotlin with Spring Boot 3
- Vaadin 24 for UI
- Actuator, Validation, Web
- Micrometer (OTLP/Prometheus registries included but optional)
See HELP.md for curated framework links that Spring Boot generated.
./gradlew bootRun # macOS/Linux
gradlew.bat bootRun # WindowsThe app will start on http://localhost:8080 by default.
./gradlew test # macOS/Linux
gradlew.bat test # Windows./gradlew buildThe packaged artifact will be at build/libs/.
- Create a new repository from this template (or clone and re‑init Git).
- Update metadata in
build.gradle.kts:group,version, anddescription.
- Rename the base package and directories:
- Current package:
software.robsoncassiano.template.springproject - Files to update:
src/main/kotlin/.../SpringProjectApplication.ktsrc/test/kotlin/.../SpringProjectApplicationTests.kt
- Use your IDE’s “Refactor → Rename Package” to safely rename packages and move folders.
- Current package:
- Search and replace references to the old name in the repository (README, compose files, etc.).
- Update application configuration in
src/main/resources/application.propertiesas needed.
- A
compose.yamlfile exists, but it’s intentionally empty to let you define services your app needs (databases, message brokers, etc.). - Add services and networks according to your needs. Example services you might add:
- Postgres, Redis, RabbitMQ, Keycloak, etc.
- When services are defined, start your dev environment with:
docker compose up -dThen run the app locally against those services using bootRun.
Micrometer registries for OTLP and Prometheus are on the classpath as runtime dependencies. To use them:
- Prometheus: expose
/actuator/prometheusand scrape via Prometheus server. - OTLP: set the required
management.otlp.metrics.export.*properties.
Refer to Spring Boot and Micrometer docs linked in HELP.md.
bootRun— run the applicationtest— run testsbuild— assemble JAR and run testsbootJar— build only the executable JAR
src/
main/
kotlin/…/SpringProjectApplication.kt # Application entry point
resources/application.properties # App configuration
test/
kotlin/…/SpringProjectApplicationTests.kt
build.gradle.kts # Build configuration
compose.yaml # Define dev services (optional)
- Keep the Vaadin version aligned with the BOM in
build.gradle.kts(vaadinVersion). - Enable live reload with Spring Boot DevTools (included as
developmentOnly). - When changing the Java/Kotlin version, also update your IDE SDK settings.
Add your project’s license here.