Modular Architecture

Modular architecture for Spring Boot microservices

Spring Middleware is organized as a modular platform for Spring Boot microservices. It provides reusable modules for core infrastructure, data access, messaging, and platform services, allowing incremental adoption while maintaining consistent runtime behavior across services.

BOM dependency management Incremental adoption Core, data, messaging, platform modules Spring Boot modular architecture Reusable infrastructure components

What this page is for

This page is the map of the platform. It shows how Spring Middleware is organized into reusable module groups, how those groups fit together, and where the platform documentation explains the runtime behavior around communication, registry, errors, security, logging, and messaging.

  • Understand the main module families
  • See which capabilities belong to runtime modules
  • Differentiate reusable modules from platform guides
  • Adopt only the subset your service actually needs

Adoption model

Spring Middleware is distributed through a BOM so services can keep versions aligned while still depending only on the modules they need. The goal is consistency of infrastructure behavior, not forcing every service to carry the entire platform.

  • Use the BOM to keep module versions aligned.
  • Start small with the runtime modules your service needs today.
  • Grow by capability as messaging, GraphQL, registry, or data concerns appear.

BOM-based platform distribution

The platform is published via Maven Central and managed through a BOM. That keeps module versions coherent across services and reduces dependency drift.

Import the BOM

<dependencyManagement>
  <dependencies>
    <dependency>
      <groupId>io.github.spring-middleware</groupId>
      <artifactId>bom</artifactId>
      <version>1.3.0</version>
      <type>pom</type>
      <scope>import</scope>
    </dependency>
  </dependencies>
</dependencyManagement>

Then add only what you need

<dependencies>
  <dependency>
    <groupId>io.github.spring-middleware</groupId>
    <artifactId>app</artifactId>
  </dependency>

  <dependency>
    <groupId>io.github.spring-middleware</groupId>
    <artifactId>kafka-core</artifactId>
  </dependency>
</dependencies>

Module groups

The platform is organized into a few clear module families. Each family solves a different part of the infrastructure model.

Core

Foundational runtime pieces used across the platform, including shared API, application support, common abstractions, and core models.

  • commons
  • api
  • app
  • model-api / model-core
  • view-api / view-core

Messaging

  • Kafka integration
  • RabbitMQ integration
  • Retry and dead-letter patterns
  • Consumer and handler conventions

Platform

Modules that make the platform discoverable and topology-aware, including registry services and GraphQL-related components.

How the pieces fit together

A service usually depends on a small subset of modules, while the broader platform documentation explains how those modules behave at runtime.

Spring Middleware BOM Core Modules app • api • commons • models Data Modules mongo • jpa • redis • cache Messaging Modules kafka • rabbitmq Platform Modules registry • graphql • gateway Platform guides architecture • registry • communication • errors • logging • security • client-security

Platform guides

Not everything is a module page. Some topics describe how the platform behaves across modules and services.

Next steps

Continue through the platform

Explore the related guides and capability pages to understand how this part of Spring Middleware fits into the broader runtime model.