spring-modulith

Featured

Use when organizing or verifying a modular Spring Boot monolith with Spring Modulith, including module APIs, dependency rules and reliable module events. Do not restructure an application into modules for an unrelated endpoint change.

AI & Automation 260 stars 40 forks Updated 4 days ago MIT

Install

View on GitHub

Quality Score: 88/100

Stars 20%
80
Recency 20%
100
Frontmatter 20%
70
Documentation 15%
100
Issue Health 10%
80
License 10%
100
Description 5%
100

Skill Content

# Spring Modulith ## Spring Boot 3 baseline Use the Spring Modulith 1.4 line with Boot 3.5; check the official compatibility matrix for older Boot 3 minors. ## Apply within the existing architecture Inspect the application root package, module boundaries and current dependency graph. Use direct subpackages as modules; keep their API at the module root and implementation in internal subpackages. Expose a named interface only for an intentional shared API. Use allowedDependencies when the architecture needs explicit dependency constraints. Avoid creating a generic shared module that every feature depends on. ## Verify boundaries Add spring-modulith-starter-test with test scope and run ApplicationModules.of(Application.class).verify() in CI. It checks cycles and access to module internals. Add ApplicationModuleTest for behavior confined to a module. A passing structure check does not prove transactional or delivery correctness. See [good module verification](examples/good-module-test.java) and [bad cross-module dependency](examples/bad-module-dependency.java). ## Reliable events Publish immutable event payloads containing IDs and necessary facts, not managed JPA entities. Use ApplicationModuleListener for asynchronous transactional listeners when that timing fits. For delivery that must survive a process crash, configure a persistent event publication registry using the chosen JDBC/JPA starter and manage its schema through migrations. An in-memory registry and a plain a...

Details

Author
rrezartprebreza
Repository
rrezartprebreza/spring-boot-skills
Created
4 months ago
Last Updated
4 days ago
Language
Java
License
MIT

Integrates with

Similar Skills

Semantically similar based on skill content — not just same category

AI & Automation Solid

spring-modulith-verifier

Verifies whether code follows Spring Modulith code structure or not. Show list of violations along with recommendations on how to fix them. Use this skill: * When reviewing Spring Boot applications which uses Spring Modulith * When verifying whether Spring Boot application code follows Spring Modulith package structure

181 Updated 1 weeks ago
sivaprasadreddy
AI & Automation Featured

multi-module-maven

Use when working in a multi-module Maven project. Covers parent POM conventions, shared dependency management, inter-module rules, build ordering, and Spring Boot 4 modular starter selection.

260 Updated 4 days ago
rrezartprebreza
Data & Documents Solid

spring-boot-skill

Build Spring Boot 4.x applications following the best practices. Use this skill: * When developing Spring Boot applications using Spring MVC, Spring Data JPA, Spring Modulith, Spring Security * To create recommended Spring Boot package structure * To implement REST APIs, entities/repositories, service layer, modular monoliths * To use Thymeleaf view templates for building web applications * To write tests for REST APIs and Web applications * To write ArchUnit tests for testing architecture * To configure the recommended plugins and configurations to improve code quality, and testing while using Maven. * To use Spring Boot's Docker Compose support for local development * To create Taskfile for easier execution of common tasks while working with a Spring Boot application

181 Updated 1 weeks ago
sivaprasadreddy