GH-103 - Introduce ApplicationModuleInitializer.

Application modules can now declare instances of ApplicationModuleInititalizer to execute code upon an ApplicationStartedEvent.

This is achieved by registering a corresponding ApplicationListener in SpringModulithRuntimeAutoConfiguration to invoke all instances of AMI sorted via the Comparator introduced in GH-102. To make sure that the invocation order follows topological order, the runtime module strongly depends on JGraphT.
This commit is contained in:
Oliver Drotbohm
2023-01-05 10:19:51 +01:00
parent a7e033172b
commit d9aedb8ebf
3 changed files with 91 additions and 0 deletions

View File

@@ -22,6 +22,12 @@
<version>${project.version}</version>
</dependency>
<dependency>
<groupId>org.jgrapht</groupId>
<artifactId>jgrapht-core</artifactId>
<version>1.4.0</version>
</dependency>
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-autoconfigure</artifactId>