github avatar

Kotlin Springboot

This covers the practical stuff you need to know when building Spring Boot apps with Kotlin instead of Java. It walks you through idiomatic dependency injection using primary constructors, setting up JPA entities with the kotlin-jpa plugin so you don't have to manually make classes open, and using data classes for DTOs and configuration properties. The testing section is solid, recommending Kotest and MockK over Java-based alternatives since they're built for Kotlin's syntax. It also covers coroutines integration, which is where Kotlin really shines in Spring Boot for async work.

skills.sh installs
9.8K
GitHub stars
41K
last updated
Aug 21, 2026

Install

$ npx -y skills add github/awesome-copilot --skill kotlin-springboot --agent claude-code

Installs into .claude/skills of the current project.

Files

Spring Boot with Kotlin Best Practices

Your goal is to help me write high-quality, idiomatic Spring Boot applications using Kotlin.

Project Setup & Structure

  • Build Tool: Use Maven (pom.xml) or Gradle (build.gradle) with the Kotlin plugins (kotlin-maven-plugin or org.jetbrains.kotlin.jvm).
  • Kotlin Plugins: For JPA, enable the kotlin-jpa plugin to automatically make entity classes open without boilerplate.
  • Starters: Use Spring Boot starters (e.g., spring-boot-starter-web, spring-boot-starter-data-jpa) as usual.
  • Package Structure: Organize code by feature/domain (e.g., com.example.app.order, com.example.app.user) rather than by layer.

Dependency Injection & Components

  • Primary Constructors: Always use the primary constructor for required dependency injection. It's the most idiomatic and concise approach in Kotlin.
  • Immutability: Declare dependencies as private val in the primary constructor. Prefer val over var everywhere to promote immutability.
  • Component Stereotypes: Use @Service, @Repository, and @RestController annotations just as you would in Java.

Configuration

Sponsors

Details

Repository
github.com/github/awesome-copilot
Categories
Git & Pull Requests, AI & Agent Building, Mobile Development, Java & JVM

More from github/awesome-copilot

All 318
1github avatarimage-manipulation-image-magickgithub/awesome-copilotProcess and manipulate images using ImageMagick. Supports resizing, format conversion, batch processing, and retrieving image metadata. Use when working with im9.8Kskills.sh installs
2github avatarplantuml-asciigithub/awesome-copilotGenerate ASCII art diagrams using PlantUML text mode. Use when user asks to create ASCII diagrams, text-based diagrams, terminal-friendly diagrams, or mentions 9.8Kskills.sh installs
3github avatarreadme-blueprint-generatorgithub/awesome-copilotIntelligent README.md generation prompt that analyzes project documentation structure and creates comprehensive repository documentation. Scans .github/copilot 9.7Kskills.sh installs
4github avatardevops-rollout-plangithub/awesome-copilotGenerate comprehensive rollout plans with preflight checks, step-by-step deployment, verification signals, rollback procedures, and communication plans for infr9.7Kskills.sh installs
5github avatarmy-pull-requestsgithub/awesome-copilotList my pull requests in the current repository9.7Kskills.sh installs
6github avatarcsharp-docsgithub/awesome-copilotEnsure that C# types are documented with XML comments and follow best practices for documentation.9.7Kskills.sh installs