Baike.dev
All toolsOnline toolsAI codingTrendingOpen sourceNewsSubmit
Log in
< Back to tools
S

spring-modulith

> 后端框架
Open source

Modular applications with Spring Boot

1.2K stars0 likes1 views
WebsiteGitHub

About

Modular applications with Spring Boot

= Spring Modulith image:https://img.shields.io/badge/Revved%20up%20by-Develocity-06A0CE?logo=Gradle&labelColor=02303A["Revved up by Develocity", link="https://ge.spring.io/scans?search.rootProjectNames=Spring Modulith"]

:docs: https://docs.spring.io/spring-modulith/reference/

Spring Modulith allows developers to build well-structured Spring Boot applications and guides developers in finding and working with link:{docs}fundamentals.html#modules[application modules] driven by the domain. It supports the link:{docs}verification.html[verification] of such modular arrangements, link:{docs}testing.html[integration testing] individual modules, link:{docs}production-ready.html#observability[observing] the application's behavior on the module level and creating link:{docs}documentation.html[documentation snippets] based on the arrangement created.

== Quickstart

. Create a Spring Boot application on https://start.spring.io . Add Spring Modulith to your application by adding this to your pom.xml: + [source, xml]

  org.springframework.modulith
  spring-modulith-bom
  2.0.5
  import
  pom






org.springframework.modulith
spring-modulith-starter-test
test

. Create a Java package arrangement that puts business modules as link:{docs}fundamentals.html[direct sub-packages of the application's main package]. + [source, text, subs="macros"]

□ Example └─ □ src/main/java ├─ □ example
| └─ Application.java ├─ □ example.inventory | └─ … └─ □ example.order
└─ …


The application root package Application module packages . Create link:{docs}fundamentals.html#modules[an ApplicationModules model], run link:{docs}verification.html[verifications] and link:{docs}documentation.html[create documentation snippets]. + [source, java]

class ApplicationTests {

@Test void writeDocumentationSnippets() {

var modules = ApplicationModules.of(Application.class).verify(); 

new Documenter(modules) 
  .writeModulesAsPlantUml()
  .writeIndividualModulesAsPlantUml();

} }

Creates application module model and link:{docs}verification.html[verifies its structure]. Renders link:{docs}documentation.html[Asciidoctor snippets] (component diagrams, application module canvas) to target/modulith-docs. . Run link:{docs}testing.html[integration tests] for individual application modules. + [source, text, subs="macros"]

□ Example └─ □ src/test/java └─ □ example.order └─ OrderModuleIntegrationTests.java


[source, java]

@ApplicationModuleTests class OrderModuleIntegrationTests {

@Test void someTestMethod() { … } }

== Reference documentation

Find the reference documentation link:{docs}[here].

== Contributing

https://help.github.com/articles/creating-a-pull-request[Pull requests] are welcome. Note, that we expect everyone to follow the https://github.com/spring-projects/.github/blob/main/CODE_OF_CONDUCT.md[code of conduct].

=== What you will need

  • Git
  • Java 17 or higher
  • Docker version 1.6.0 or higher

=== Get the Source Code

Clone the repository

[source,bash]

git clone [email protected]:spring-projects/spring-modulith.git cd spring-modulith

=== Build the code

To compile, test, and build

[source,bash]

./mvnw -B

== License Spring Modulith is Open Source software released under the https://www.apache.org/licenses/LICENSE-2.0.html[Apache 2.0 license].

Issues· 0 open

View all issuesOpen on GitHub

No open issues yet, or sync has not completed.

> Tags

Javaarchitecturemodularityspring-boot

No comments yet. Be the first to share.

> Details

PublishedAug 1, 2026
UpdatedSep 17, 2026
Category后端框架
PricingOpen source

> Related tools

N
Node.js
基于 V8 的 JavaScript 运行时
D
Django
Python 高级 Web 框架
S
Spring Boot
Java 生态主流微服务框架