spring-boot-4-conventions

Enforce Spring Framework 7 and Spring Boot 4 idioms across Spring projects.

50|7|Updated Apr 18, 2026
One-click install
npx skills add https://github.com/loiane/specs-driven-development-spring-angular --skill spring-boot-4-conventions
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: spring-boot-4-conventions
Source: https://github.com/loiane/specs-driven-development-spring-angular/tree/main/.windsurf/skills/spring-boot-4-conventions
Command: npx skills add https://github.com/loiane/specs-driven-development-spring-angular --skill spring-boot-4-conventions

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

Spring Framework 7 / Spring Boot 4 conventions codify modern idioms and defaults to keep Spring projects consistent, maintainable, and aligned with the latest platform capabilities.

Core Features & Use Cases

  • Package layout — by feature, not by layer, with public api at the feature boundary and typed sub-packages for internal classes.
  • Dependency injection — constructor injection only; avoid Lombok; enforce explicit constructors.
  • HTTP clients — prefer declarative HttpExchange clients for external calls and avoid RestTemplate.
  • Web layer and DTOs — controllers expose DTOs, validate inputs, and avoid returning entities.
  • Observability and configuration — per-module configuration properties, structured logging, and AOT-friendly setup.

Quick Start

Restructure your codebase to feature-based packages, switch to constructor injection, and implement HTTP clients using @HttpExchange to align with the conventions.

Frequently Asked Questions about spring-boot-4-conventions

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

FAQPage Schema
What are the Spring Boot 4 conventions for dependency injection?

Spring Boot 4 conventions mandate constructor injection exclusively and avoiding Lombok to ensure explicit, AOT-friendly, and testable code structures.

How do I structure packages for a modern Spring Boot application?

Structure Spring Boot packages by feature rather than layer, placing public API at the feature boundary and organizing internal classes into typed sub-packages.

Should I use RestTemplate or HttpExchange for HTTP clients in Spring Framework 7?

Spring Framework 7 conventions prefer declarative HttpExchange clients for external calls and explicitly avoid using RestTemplate to align with modern platform capabilities.

Why avoid returning entities directly from Spring Boot controllers?

Spring Boot controllers should expose DTOs and validate inputs rather than returning entities to maintain a clean web layer and support structured API boundaries.

How do I configure Spring Boot 4 application properties for AOT compatibility?

Configure Spring Boot 4 properties per-module and adopt structured logging alongside an AOT-friendly setup to ensure consistent maintainability across project modules.

Does Spring Framework 7 require avoiding Lombok for AOT compilation?

Yes, Spring Framework 7 conventions require avoiding Lombok and enforcing explicit constructors to support AOT-friendly compilation and ensure fully testable code.