Spring Boot Patterns

Use when the user asks about Spring Boot service layer and transaction boundaries, @Transactional, constructor injection, Spring AOP, Spring Security filter chain or @DataJpaTest/@WebMvcTest. Produces Spring Boot pattern code. Not for package layout (use spring-boot-architecture).

45 stars 6 forksSoftware Development

Install

skills CLI (Claude Code, Cursor, Codex and more)
npx skills add j4flmao/agent-skills --skill spring-boot-patterns
Manual install
git clone --depth 1 https://github.com/j4flmao/agent-skills.git /tmp/agent-skills
mkdir -p ~/.claude/skills
cp -r /tmp/agent-skills/skills/backend/spring-boot/patterns ~/.claude/skills/spring-boot-patterns

Personal skills live in ~/.claude/skills. Use .claude/skills in a project folder to share a skill with your team.

From the SKILL.md

# Spring Boot Patterns

## Purpose
Implement production-grade Spring Boot patterns — dependency injection, aspect-oriented programming, data access, security, transaction management, and testing.

## Architecture Decision Trees

### Injection Strategy

| Criterion | Constructor | Field (@Autowired) | Setter |
|-----------|------------|-------------------|--------|
| Immutability | Yes (final fields) | No | No |
| Testability | Instantiate directly | Reflection required | Easy override |
| Null safety | Compiler-enforced | Runtime NPE if missing | Runtime NPE |
| Circular dependency | Detected at startup | Hidden | Hidden |
| Constructor params | All in one call | Zero-arg constructor needed | Mutable |
| Framework coupling | None (pure Java) | Spring annotation | Spring annotation |

Decision: Constructor injection always. Field injection only in tests (via `@InjectMocks`). Setter injection never.

### Transaction Propagation

| Propagation | Behavior | Use Case |
|-------------|----------|----------|
| REQUIRED (default) | Join existing or create new | Most service methods |
| REQUIRES_NEW | Suspend existing, create new | Audit logging, independent actions |
| NESTED | Savepoint within existing | Partial rollback within batch |
| MANDATORY | Fail if no existing tx | Internal service calls that need caller tx |
| NEVER | Fail if existing tx | Long-running reads, avoid connection hold |
| SUPPORTS | Optional tx | Read-only queries, optional transactional |
Read the full skill on GitHub

Details

Skill name
spring-boot-patterns
Path
skills/backend/spring-boot/patterns/SKILL.md
License
MIT
Repo updated
17 November 2026

FAQ

What does the Spring Boot Patterns skill do?

Use when the user asks about Spring Boot service layer and transaction boundaries, @Transactional, constructor injection, Spring AOP, Spring Security filter chain or @DataJpaTest/@WebMvcTest. Produces Spring Boot pattern code. Not for package layout (use spring-boot-architecture).

How do I install the Spring Boot Patterns skill?

skills CLI (Claude Code, Cursor, Codex and more): npx skills add j4flmao/agent-skills --skill spring-boot-patterns. Skills go in ~/.claude/skills (personal) or .claude/skills (project), and Claude loads them automatically when a task matches the description.

Is Spring Boot Patterns popular?

It lives in j4flmao/agent-skills, which has 45 GitHub stars and 6 forks.

Related skills

Agent Observability

45

j4flmao/agent-skills

Use when the user asks about agent observability, tracing agent reasoning, debugging an agent loop, OpenTelemetry GenAI spans for LLM calls, LLM cost tracking per agent, agent audit logs or hallucination/eval monitoring in production. Produces instrumentation config, trace schema, dashboards, alerts and cost attribution. Not for generic service tracing without LLMs (use devops-opentelemetry).

DevOps & Cloud

AI Agent Architectures

45

j4flmao/agent-skills

Use when the user asks to build an AI agent, design an agent that calls tools and keeps memory, write an agent system prompt or pick an agent framework (Claude Agent SDK, OpenAI Agents SDK, LangGraph). Produces an architecture brief covering loop, tools, memory, guardrails and evals, routing depth to child skills. Not for workflow patterns (use ai-agentic-workflows).

AI, LLMs & Agents

AI Agent Core Loop

45

j4flmao/agent-skills

Use when the user asks about the agent loop, ReAct vs plan-and-solve, re-planning, Reflexion, an agent stuck in a loop, max iterations or termination conditions. Produces a loop spec or patch with state, success predicate, caps and no-progress detection. Not for overall agent design (use ai-agent-architectures) or tool schemas (use tool-calling-principles).

AI, LLMs & Agents

Symfony Backend

45

j4flmao/agent-skills

Use when the user asks about Symfony, Doctrine ORM entities, Symfony Messenger, autowiring, security voters, Flex recipes or WebTestCase. Produces Symfony 7 services, entities and tests. Not for Laravel (use php-laravel) or Laminas (use php-zend).

Software Development

Spring Boot Architecture

45

j4flmao/agent-skills

Use when the user asks about Spring Boot project structure, package-by-feature, hexagonal Spring, Spring WebFlux vs MVC, Spring Data repositories or Spring profiles. Produces a Spring Boot 3/4 service layout. Not for @Transactional, AOP, security or testing recipes (use spring-boot-patterns).

Software Development

Tpu Systolic Arrays

45

j4flmao/agent-skills

Use when the user asks about TPUs, systolic arrays, the MXU, XLA on TPU, JAX TPU performance, Pallas kernels, TPU padding or recompilation. Produces shape, dtype and sharding rules plus JAX code and profiling steps. Not for NVIDIA GPU kernels (use cuda-programming) or GPU multi-node training (use distributed-training).

Software Development

Browse the most popular Claude skills, all software development skills, or write your own with the skills generator.