Stats
Actions
Tags
From qe-framework
Generates Spring Boot 3.x configurations, REST controllers, Spring Security 6 auth flows, Spring Data JPA repositories, and reactive WebFlux endpoints for microservices or reactive Java applications.
How this skill is triggered — by the user, by Claude, or both
Slash command
/qe-framework:Qspring-boot-engineerThe summary Claude sees in its skill listing — used to decide when to auto-load this skill
1. **Analyze requirements** — Identify service boundaries, APIs, data models, security needs
./mvnw test (or ./gradlew test) and confirm all pass before proceeding. If tests fail: review the stack trace, isolate the failing assertion or component, fix the issue, and re-run the full suite/actuator/health returns UP. If health is DOWN: check the components detail in the response, resolve the failing component (e.g., datasource, broker), and re-validateFor detailed patterns, see: references/{web,data,security,cloud,testing}.md
/** REST endpoint delegating to ProductService. */
@RestController @RequestMapping("/api/v1/products")
public class ProductController {
private final ProductService service;
public ProductController(ProductService service) { this.service = service; }
/** @param name search term; @return matching products */
@GetMapping
public List<Product> search(@RequestParam(defaultValue = "") String name) {
return service.search(name);
}
}
/** Business logic managing transactions and repository calls. */
@Service
public class ProductService {
private final ProductRepository repo;
public ProductService(ProductRepository repo) { this.repo = repo; }
/** @param name filter; @return matching products */
@Transactional(readOnly = true)
public List<Product> search(String name) {
return repo.findByNameContainingIgnoreCase(name);
}
}
/** Centralized REST exception handler. */
@RestControllerAdvice
public class GlobalExceptionHandler {
/** @param ex binding error; @return 400 with field errors */
@ExceptionHandler(MethodArgumentNotValidException.class)
public ResponseEntity<Map<String,String>> handleValidation(
MethodArgumentNotValidException ex) {
var errors = ex.getBindingResult().getFieldErrors().stream()
.collect(Collectors.toMap(FieldError::getField, FieldError::getDefaultMessage));
return ResponseEntity.status(HttpStatus.BAD_REQUEST).body(errors);
}
/** @param ex not found; @return 404 with message */
@ExceptionHandler(EntityNotFoundException.class)
public ResponseEntity<Map<String,String>> handleNotFound(EntityNotFoundException ex) {
return ResponseEntity.status(HttpStatus.NOT_FOUND).body(Map.of("error", ex.getMessage()));
}
}
/** Reactive REST endpoint returning Mono/Flux. */
@RestController @RequestMapping("/api/v1/reactive/orders")
public class OrderFluxController {
private final OrderService service;
public OrderFluxController(OrderService service) { this.service = service; }
/** @param id order id; @return Mono<Order> or empty */
@GetMapping("/{id}")
public Mono<ResponseEntity<Order>> getOrder(@PathVariable Long id) {
return service.findById(id).map(ResponseEntity::ok)
.defaultIfEmpty(ResponseEntity.notFound().build());
}
/** @return Flux of all orders */
@GetMapping
public Flux<Order> listOrders() { return service.findAll(); }
}
/** [One-line purpose]. [Optional: additional context].
* @param paramName [description]
* @return [description]
* @throws ExceptionType [when/why]
*/
./mvnw checkstyle:check # Google style; fail on violations
./mvnw spotbugs:check # Null, resource leaks, bugs
./mvnw clean verify # Full build + JaCoCo ≥ 85% coverage
@EnableWebSecurity + @Bean SecurityFilterChain@CrossOrigin or WebMvcConfigurer; never allowCredentials=true with */actuator/health public, others require ACTUATOR role./mvnw dependency-check:check monthly; pin/upgrade patches| Wrong | Correct |
|---|---|
@Autowired private Repo r; | public Service(Repo r) { this.r = r; } |
catch (Exception e) {} | catch (SpecificException e) or propagate to @ControllerAdvice |
| 50-method God Service | Split: AuthService, CacheService, ProductService |
No @Transactional on writes | Add @Transactional; use readOnly=true for reads |
System.getenv("DB_PW") hardcoded | Use @Value or @ConfigurationProperties + env vars |
@Autowired on fields)@Valid + @RequestBody on every mutating endpoint@Transactional on multi-step writes; @Transactional(readOnly = true) on reads@Service/@Repository/@RestController (not generic @Component)@RestControllerAdvice) for API errors@Autowired on fields).block() in WebFlux)application.properties/application.ymlWebSecurityConfigurerAdapter)npx claudepluginhub inho-team/qe-framework --plugin qe-frameworkCreates, edits, and optimizes skills for Claude Code, including drafting, evaluating with test prompts, iterating on performance, and improving skill descriptions for better triggering accuracy.