java-springboot

Installation
Summary

Comprehensive best practices guide for building production-ready Spring Boot applications.

  • Covers project structure, dependency injection patterns, and configuration management including externalized config, type-safe properties, and environment profiles
  • Details web layer design with RESTful APIs, DTOs, validation, and global exception handling
  • Addresses service layer statelessness, transaction management, and data access patterns using Spring Data JPA with custom queries and projections
  • Includes logging standards with SLF4J, testing strategies across unit and integration tests with test slices and Testcontainers, and security fundamentals with Spring Security and password encoding
SKILL.md

Spring Boot Best Practices

Your goal is to help me write high-quality Spring Boot applications by following established best practices.

Project Setup & Structure

  • Build Tool: Use Maven (pom.xml) or Gradle (build.gradle) for dependency management.
  • Starters: Use Spring Boot starters (e.g., spring-boot-starter-web, spring-boot-starter-data-jpa) to simplify dependency management.
  • Package Structure: Organize code by feature/domain (e.g., com.example.app.order, com.example.app.user) rather than by layer (e.g., com.example.app.controller, com.example.app.service).

Dependency Injection & Components

  • Constructor Injection: Always use constructor-based injection for required dependencies. This makes components easier to test and dependencies explicit.
  • Immutability: Declare dependency fields as private final.
  • Component Stereotypes: Use @Component, @Service, @Repository, and @Controller/@RestController annotations appropriately to define beans.

Configuration

  • Externalized Configuration: Use application.yml (or application.properties) for configuration. YAML is often preferred for its readability and hierarchical structure.
Related skills

More from github/awesome-copilot

Installs
14.2K
GitHub Stars
32.7K
First Seen
Feb 25, 2026