java-architect

Implements Spring Boot 3.x applications with JPA optimization, WebFlux, and JWT security.

Updated Jun 28, 2026
One-click install
npx skills add https://github.com/412181-HerediaLara/ScaffoldingBE-FE --skill java-architect-412181-heredialara
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: java-architect
Source: https://github.com/412181-HerediaLara/ScaffoldingBE-FE/tree/main/BE/.agents/skills/java-architect
Command: npx skills add https://github.com/412181-HerediaLara/ScaffoldingBE-FE --skill java-architect-412181-heredialara

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill includes references (resource) components.

What problem does it solve? Building enterprise Java applications requires coordinating many concerns—layered architecture, JPA performance, reactive endpoints, security, and test coverage—and mistakes in any of them lead to slow queries, security gaps, or failed builds. This Skill guides the design, implementation, and verification of Spring Boot 3.x services using Java 21 and established best practices. ## Core Features & Use Cases - Layered Implementation: Produces controllers, services, repositories, DTOs, and domain models following Clean Architecture and DDD, with validation and proper exception handling. - Data & Security Guidance: Provides reference patterns for JPA query optimization (N+1 prevention, projections, batching), Spring Security with OAuth2/JWT, and reactive WebFlux with R2DBC. - Quality Verification: Enforces running ./mvnw verify or ./gradlew check, checking JaCoCo coverage, and fixing failures before closing work. - Use Case: When adding a new REST endpoint to a Spring Boot microservice, use this Skill to generate the entity, repository with fetch-join query, service with transactions, secured controller, and JUnit 5/TestContainers tests in one pass. ## Quick Start Use the java-architect skill to implement a secured REST endpoint with JPA persistence and tests for my Spring Boot order service.

Frequently Asked Questions about java-architect

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

FAQPage Schema
How do I implement a REST endpoint in Spring Boot 3?

Create a @RestController with @RequestMapping, inject the service via constructor, and return ResponseEntity or Mono/Flux for reactive stacks. Validate request bodies with @Valid and let a @RestControllerAdvice map exceptions to HTTP status codes.

How to fix N+1 query problems in Spring Data JPA?

Use JOIN FETCH in JPQL, @EntityGraph on repository methods, or @BatchSize on collections to load associations in fewer queries. For read-only views, prefer DTO projections that select only the needed columns.

Does Spring Security support JWT authentication in Spring Boot 3?

Yes. Configure an oauth2ResourceServer with JWT in the SecurityFilterChain, or add a custom OncePerRequestFilter that validates Bearer tokens and populates the SecurityContext. Use @EnableMethodSecurity with @PreAuthorize for method-level rules.

Should I use WebFlux or Spring MVC for my microservice?

Choose WebFlux with R2DBC when you need non-blocking I/O and high concurrency with few threads. Choose Spring MVC with JPA when your team relies on blocking APIs, existing JDBC drivers, or simpler debugging.

Why do my Spring Boot integration tests fail with TestContainers?

Failures usually come from the container not starting, mismatched JDBC URLs, or missing @DynamicPropertySource wiring. Point spring.datasource properties at the container's JDBC URL and reuse a shared container instance to avoid port conflicts.