java-springboot

Solid

Get best practices for developing applications with Spring Boot.

AI & Automation 34,233 stars 4188 forks Updated today MIT

Install

View on GitHub

Quality Score: 93/100

Stars 20%
100
Recency 20%
100
Frontmatter 20%
70
Documentation 15%
100
Issue Health 10%
50
License 10%
100
Description 5%
100

Skill Content

# 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. - **Type-Safe Properties:** Use `@ConfigurationProperties` to bind configuration to strongly-typed Java objects. - **Profiles:** Use Spring Profiles (`application-dev.yml`, `application-prod.yml`) to manage environment-specific configurations. - **Secrets Management:** Do not hardc...

Details

Author
github
Repository
github/awesome-copilot
Created
11 months ago
Last Updated
today
Language
Python
License
MIT

Integrates with

Similar Skills

Semantically similar based on skill content — not just same category

AI & Automation Listed

java-springboot

Get best practices for developing applications with Spring Boot.

335 Updated today
aiskillstore
AI & Automation Solid

kotlin-springboot

Get best practices for developing applications with Spring Boot and Kotlin.

34,233 Updated today
github
AI & Automation Listed

spring-skills

Spring Boot framework patterns, best practices, and implementation guides

0 Updated today
murtazatouqeer
API & Backend Listed

spring-boot-patterns

Spring Boot best practices and patterns. Use when creating controllers, services, repositories, or when user asks about Spring Boot architecture, REST APIs, exception handling, or JPA patterns.

607 Updated 3 months ago
decebals
AI & Automation Solid

301-frameworks-spring-boot-core

Use when you need to review, improve, or build Spring Boot 4.0.x applications — including proper usage of @SpringBootApplication, component annotations (@Controller, @Service, @Repository), bean definition and scoping, configuration classes and @ConfigurationProperties (with @Validated), component scanning, conditional configuration and profiles, constructor injection, @Primary and @Qualifier for multiple beans of the same type, bean minimization, graceful shutdown, virtual threads, Jakarta EE namespace consistency, and scheduled tasks. This should trigger for requests such as Review Java code for Spring Boot application; Apply best practices for Spring Boot application in Java code. Part of cursor-rules-java project

393 Updated today
jabrena