Command Palette

Search for a command to run...

UnylyUnyly
Назад к скиллам

spring-boot-modulith

БесплатноБез исполняемых скриптовНе проверен

Spring Modulith 2.0 implementation for bounded contexts in Spring Boot 4. Use when structuring application modules, implementing @ApplicationModuleListener…

joaquimscostaот joaquimscosta★ 24 звезды на GitHub

Об этом скилле

Spring Modulith for Bounded Contexts

Implements DDD bounded contexts as application modules with enforced boundaries and event-driven communication.

Core Concepts

Concept Description
Application Module Package-based boundary = bounded context
Module API Types in base package (public)
Internal Types in sub-packages (encapsulated)
Events Cross-module communication mechanism

Module Structure

src/main/java/
├── com.example/
│   └── Application.java              ← @SpringBootApplication
├── com.example.order/                ← Module: order
│   ├── OrderService.java             ← Public API
│   ├── OrderCreated.java             ← Public event
│   ├── package-info.java             ← @ApplicationModule config
│   └── internal/                     ← Encapsulated
│       ├── OrderRepository.java
│       └── OrderEntity.java
├── com.example.inventory/            ← Module: inventory
│   ├── InventoryService.java
│   └── internal/
└── com.example.shipping/             ← Module: shipping

Types in com.example.order = public API Types in com.example.order.internal = hidden from other modules

Quick Patterns

See EXAMPLES.md for complete working examples including:

  • Module Configuration with @ApplicationModule
  • Event Publishing with domain event records
  • Event Handling with @ApplicationModuleListener (Java + Kotlin)
  • Module Verification Test with PlantUML generation
  • Event Externalization for Kafka/AMQP

Spring Boot 4 / Modulith 2.0 Specifics

  • @ApplicationModuleListener combines @Async + @Transactional(REQUIRES_NEW) + @TransactionalEventListener(AFTER_COMMIT)
  • Event Externalization with @Externalized annotation for Kafka/AMQP
  • JDBC event log ensures at-least-once delivery

Detailed References

Related Skills

Need Skill
DDD concepts domain-driven-design
Data layer per module spring-boot-data-ddd
Module event testing spring-boot-testing
REST APIs for modules spring-boot-web-api

Anti-Pattern Checklist

Anti-Pattern Fix
Direct bean injection across modules Use events or expose API
Synchronous cross-module calls Use @ApplicationModuleListener
Module dependencies not declared Add allowedDependencies in @ApplicationModule
Missing verification test Add ApplicationModules.verify() test
Internal types in public API Move to .internal sub-package
Events without data Include all data handlers need

Critical Reminders

  1. One module = one bounded context — Mirror DDD boundaries
  2. Events are the integration mechanism — Not direct method calls
  3. Verify in CI — ApplicationModules.verify() catches boundary violations
  4. Reference by ID — Never direct object references across modules
  5. Transaction per module — @ApplicationModuleListener ensures isolation
Полный SKILL.md на GitHub

Установить spring-boot-modulith в Claude Code и Claude Desktop

Зарегайся, чтобы установить скилл

Создай бесплатный аккаунт, чтобы открыть команду установки и сохранить скилл в библиотеку.

  • Открой команду установки в одну строку
  • Сохраняй скиллы в синхронизируемую библиотеку
  • Уведомления, когда скиллы обновляются
Зарегаться бесплатноУ меня уже есть аккаунт

Разрешённые инструменты

Инструменты, которые скиллу разрешено вызывать.

Без ограничений — скилл может использовать любой инструмент.

Вложенные файлы

EXAMPLES.mdTROUBLESHOOTING.mdWORKFLOW.mdreferences/EVENTS.mdreferences/MODULE-STRUCTURE.md

FAQ

Что делает скилл spring-boot-modulith?

Spring Modulith 2.0 implementation for bounded contexts in Spring Boot 4. Use when structuring application modules, implementing @ApplicationModuleListener for event-driven communication, testing with Scenario API, enforcing module boundaries, externalizing events to Kafka/AMQP, building a modular monolith, defining module dependencies, managing inter-module events, or organizing DDD modules as packages. Covers package-based module boundaries, named interfaces, event publication, and Scenario API testing. For architecture decisions, see domain-driven-design skill.

Как установить скилл spring-boot-modulith?

Скопируй папку скилла в ~/.claude/skills (вкладка Claude Code выше делает это одной командой), либо поставь как плагин.

Скилл spring-boot-modulith запускает скрипты?

Нет, скилл состоит только из инструкций (SKILL.md), без исполняемых скриптов.

Похожие скиллы

Сравнить spring-boot-modulith с