Skip to content

Commit

Permalink
Basic Modulithic setup
Browse files Browse the repository at this point in the history
  • Loading branch information
GODrums committed Aug 15, 2024
1 parent 40e2aac commit bc3aed9
Show file tree
Hide file tree
Showing 4 changed files with 53 additions and 3 deletions.
27 changes: 24 additions & 3 deletions server/application-server/pom.xml
Original file line number Diff line number Diff line change
@@ -1,13 +1,13 @@
<?xml version="1.0" encoding="UTF-8"?>
<project xmlns="http://maven.apache.org/POM/4.0.0"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 https://maven.apache.org/xsd/maven-4.0.0.xsd">
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 https://maven.apache.org/xsd/maven-4.0.0.xsd">
<modelVersion>4.0.0</modelVersion>
<parent>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-parent</artifactId>
<version>3.3.2</version>
<relativePath /> <!-- lookup parent from repository -->
<relativePath />
<!-- lookup parent from repository -->
</parent>
<groupId>de.tum.in.www1</groupId>
<artifactId>hephaestus</artifactId>
Expand Down Expand Up @@ -111,8 +111,29 @@
<artifactId>therapi-runtime-javadoc</artifactId>
<version>0.15.0</version>
</dependency>
<dependency>
<groupId>org.springframework.modulith</groupId>
<artifactId>spring-modulith-starter-core</artifactId>
</dependency>
<dependency>
<groupId>org.springframework.modulith</groupId>
<artifactId>spring-modulith-starter-test</artifactId>
<scope>test</scope>
</dependency>
</dependencies>

<dependencyManagement>
<dependencies>
<dependency>
<groupId>org.springframework.modulith</groupId>
<artifactId>spring-modulith-bom</artifactId>
<version>1.2.2</version>
<scope>import</scope>
<type>pom</type>
</dependency>
</dependencies>
</dependencyManagement>

<build>
<plugins>
<plugin>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,10 @@

import org.springframework.boot.SpringApplication;
import org.springframework.boot.autoconfigure.SpringBootApplication;
import org.springframework.modulith.Modulithic;

@SpringBootApplication
@Modulithic(systemName = "Hephaestus")
public class Application {

public static void main(String[] args) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,8 @@ class HephaestusApplicationTests {

@Test
void contextLoads() {
// ContextLoads
assert (true);
}

}
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
package de.tum.in.www1.hephaestus;

import org.junit.jupiter.api.Test;
import org.springframework.modulith.core.ApplicationModules;
import org.springframework.modulith.docs.Documenter;

public class HephaestusModulithTests {

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

@Test
void shouldBeCompliant() {
modules.forEach(System.out::println);
modules.verify();
}

@Test
void writeDocumentationSnippets() {
new Documenter(modules)
.writeModuleCanvases()
.writeModulesAsPlantUml()
.writeIndividualModulesAsPlantUml();
}

}

0 comments on commit bc3aed9

Please sign in to comment.