spring-boot-modulith

Enforce bounded contexts in Spring Boot applications using Spring Modulith modules.

21|4|Updated Oct 24, 2025
One-click install
npx skills add https://github.com/joaquimscosta/arkhe-claude-plugins --skill spring-boot-modulith
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: spring-boot-modulith
Source: https://github.com/joaquimscosta/arkhe-claude-plugins/tree/main/spring-boot/skills/spring-boot-modulith
Command: npx skills add https://github.com/joaquimscosta/arkhe-claude-plugins --skill spring-boot-modulith

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill includes references (resource) components.

What problem does it solve?

This Skill teaches Spring Modulith 2.0 concepts: bounded contexts as modules, ApplicationModuleListener for cross-module events, and Modulith testing.

Core Features & Use Cases

  • Module Boundaries: declare modules with ApplicationModule
  • Event Handling: cross-module communication via @ApplicationModuleListener
  • Testing: module verification and PlantUML docs
  • Externalization: externalize events to Kafka/AMQP

Quick Start

Define a module with ApplicationModule and implement a basic cross-module listener.

Frequently Asked Questions about spring-boot-modulith

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

FAQPage Schema
How do I structure a Spring Boot application into bounded contexts?

Use Spring Modulith's @ApplicationModule annotation to declare module boundaries within your Spring Boot application. Each module contains a public API package and encapsulated internals, enforcing separation of concerns and preventing unwanted cross-module dependencies.

What's the best way to handle cross-module communication in a modular monolith?

Implement event-driven communication using @ApplicationModuleListener to publish and handle events across modules. This decouples modules while maintaining consistency, enabling asynchronous cross-module workflows without direct dependencies.

Can I verify module boundaries are enforced in my Spring Boot application?

Yes. Spring Modulith provides module verification that runs in CI/CD pipelines to detect architectural violations. It generates PlantUML documentation and ensures modules respect declared boundaries, catching violations early in development.

How do I externalize module events to Kafka or AMQP?

Spring Modulith supports event externalization to messaging systems like Kafka and AMQP. Configure event publication logs using JDBC-based storage, then route events to your chosen messaging infrastructure for distributed system integration.

Does Spring Modulith work with Spring Boot 4?

Yes. Spring Modulith 2.0 is designed for Spring Boot 4 applications. It provides patterns and tooling specifically for building modular monoliths with modern Spring Boot architecture, including module configuration and event handling semantics.

What's the difference between public and internal APIs in module design?

Modules declare a public API package for external consumption and internal packages that remain encapsulated. This enforces module contracts, preventing other modules from depending on implementation details and maintaining clean architectural boundaries.