Skip to content

Commit 79f40e9

Browse files
ciberkleidodrotbohm
authored andcommitted
GH-943 - Explain when to add Spring Modulith's Core artifact as compile-time dependency.
1 parent 8019a80 commit 79f40e9

File tree

1 file changed

+24
-0
lines changed

1 file changed

+24
-0
lines changed

src/docs/antora/modules/ROOT/pages/fundamentals.adoc

Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -516,6 +516,30 @@ This class can now be registered as `spring.modulith.detection-strategy` as foll
516516
spring.modulith.detection-strategy=example.CustomApplicationModuleDetectionStrategy
517517
----
518518

519+
If you are implementing the `ApplicationModuleDetectionStrategy` interface to customize the verification and documentation of modules, include the customization and its registration in your application's test sources. However, if the customization is intended for runtime components that require access to the module structure—potentially in relation to xref:runtime.adoc#spring-modulith-runtime-support[Spring Modulith runtime support] or xref:production-ready.adoc#production-ready-features[production-ready features] (e.g., actuator and observability support)—you must explicitly declare the following as a compile-time dependency:
520+
521+
[tabs]
522+
======
523+
Maven::
524+
+
525+
[source, xml, role="primary"]
526+
----
527+
<dependency>
528+
<groupId>org.springframework.modulith</groupId>
529+
<artifactId>spring-modulith-core</artifactId>
530+
</dependency>
531+
----
532+
Gradle::
533+
+
534+
[source, groovy, role="secondary"]
535+
----
536+
dependencies {
537+
implementation 'org.springframework.modulith:spring-modulith-core'
538+
}
539+
----
540+
======
541+
542+
519543
[[contributing-application-modules]]
520544
=== Contributing Application Modules From Other Packages
521545

0 commit comments

Comments
 (0)