Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Modular applications with Spring Boot

License

NotificationsYou must be signed in to change notification settings

spring-projects/spring-modulith

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Spring Modulith allows developers to build well-structured Spring Boot applications and guides developers in finding and working withapplication modules driven by the domain.It supports theverification of such modular arrangements,integration testing individual modules,observing the application’s behavior on the module level and creatingdocumentation snippets based on the arrangement created.

Quickstart

  1. Create a Spring Boot application onhttps://start.spring.io

  2. Add Spring Modulith to your application by adding this to yourpom.xml:

    <!-- Include the BOM for simplified version management--><dependencyManagement>  <dependencies>    <dependency>      <groupId>org.springframework.modulith</groupId>      <artifactId>spring-modulith-bom</artifactId>      <version>1.3.1</version>      <scope>import</scope>      <type>pom</type>    </dependency>  </dependencies></dependencyManagement><dependencies><!-- The test dependency to pull in verification APIs-->  <dependency>    <groupId>org.springframework.modulith</groupId>    <artifactId>spring-modulith-starter-test</artifactId>    <scope>test</scope>  </dependency></dependencies>
  3. Create a Java package arrangement that puts business modules asdirect sub-packages of the application’s main package.

    □ Example└─ □ src/main/java   ├─ □ example           <1>   |  └─ Application.java   ├─ □ example.inventory <2>   |  └─ …   └─ □ example.order     <2>      └─ …
    1. The application root package

    2. Application module packages

  4. CreateanApplicationModules model, runverifications andcreate documentation snippets.

    classApplicationTests {@TestvoidwriteDocumentationSnippets() {varmodules =ApplicationModules.of(Application.class).verify(); (1)newDocumenter(modules) (2)      .writeModulesAsPlantUml()      .writeIndividualModulesAsPlantUml();  }}
    1. Creates application module model andverifies its structure.

    2. RendersAsciidoctor snippets (component diagrams, application module canvas) totarget/modulith-docs.

  5. Runintegration tests for individual application modules.

    □ Example└─ □ src/test/java   └─ □ example.order      └─ OrderModuleIntegrationTests.java
    @ApplicationModuleTestsclassOrderModuleIntegrationTests {@TestvoidsomeTestMethod() { … }}

Reference documentation

Find the reference documentationhere.

Contributing

Pull requests are welcome. Note, that we expect everyone to follow thecode 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

git clone git@github.com:spring-projects/spring-modulith.gitcd spring-modulith

Build the code

To compile, test, and build

./mvnw -B

License

Spring Modulith is Open Source software released under theApache 2.0 license.

About

Modular applications with Spring Boot

Topics

Resources

License

Code of conduct

Contributing

Security policy

Stars

Watchers

Forks

Contributors57


[8]ページ先頭

©2009-2025 Movatter.jp