spring-boot

Enforce Spring Boot conventions for dependency injection, REST controllers, configuration, data access, and testing.

Updated Mar 31, 2026
One-click install
npx skills add https://github.com/dotBeeps/pantry --skill spring-boot-dotbeeps
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: spring-boot
Source: https://github.com/dotBeeps/pantry/tree/main/morsels/skills/spring-boot
Command: npx skills add https://github.com/dotBeeps/pantry --skill spring-boot-dotbeeps

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

Spring Boot conventions standardize app architecture to reduce boilerplate and ensure consistent patterns across projects.

Core Features & Use Cases

  • Dependency Injection: enforce constructor injection only and limit number of injected dependencies per class.
  • REST Controllers: use @RestController, return ResponseEntity when needed, and centralize exception handling.
  • Configuration: prefer application.yml and @ConfigurationProperties for complex config.
  • JPA / Data: place @Transactional on service layer, extend JpaRepository, lazy fetch, and map entities to DTOs.
  • Testing: use appropriate Spring test slices and Testcontainers or in-memory DBs for integration tests.

Quick Start

Apply these conventions to your Spring Boot project to standardize wiring, configuration, and testing.

Frequently Asked Questions about spring-boot

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
What Spring Boot conventions should I follow to standardize app architecture?

Spring Boot conventions for robust apps enforce constructor dependency injection, @RestController usage, @ConfigurationProperties for complex config, service-layer @Transactional, and consistent test slices to standardize app architecture and reduce boilerplate.

How do I configure complex settings in a Spring Boot application?

To configure complex settings in a Spring Boot application, prefer using application.yml combined with @ConfigurationProperties classes. This approach centralizes and type-safely manages configurations, replacing scattered @Value annotations for maintainable code.

Where should I put @Transactional when using Spring Data JPA?

You should place @Transactional on the service layer when using Spring Data JPA. This keeps transaction boundaries within business logic for safe data access, while repositories extend JpaRepository and entities map to DTOs.

What is the best way to test Spring Boot REST controllers and JPA repositories?

The best way to test Spring Boot REST controllers and JPA repositories is using appropriate Spring test slices. For integration tests, standardize testing practices by using Testcontainers or in-memory databases to ensure reliable, isolated validation.

Does this Spring Boot convention support microservices and backend services?

Yes, these Spring Boot conventions apply to backend services and microservices. They enforce robust app architecture by limiting injected dependencies per class, centralizing exception handling, and standardizing wiring to reduce boilerplate across distributed projects.