Skip to content

Commit 3b3e6b4

Browse files
committed
GH-943 - Polishing.
Slight rewording of the section talking about the usage of application module detection strategies with runtime components. Added notes in both the runtime support and production ready features chapters to point to the new instructions.
1 parent 2712c55 commit 3b3e6b4

File tree

3 files changed

+6
-1
lines changed

3 files changed

+6
-1
lines changed

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

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -516,7 +516,8 @@ 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:
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.
520+
However, if you are using Spring Modulith xref:runtime.adoc#spring-modulith-runtime-support[runtime components] (such as the ``ApplicationModuleInitializer``s, or the xref:production-ready.adoc#production-ready-features[production-ready features] like the actuator and observability support), you need to explicitly declare the following as a compile-time dependency:
520521

521522
[tabs]
522523
======

src/docs/antora/modules/ROOT/pages/production-ready.adoc

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,8 @@
11
[[production-ready]]
22
= Production-ready Features
33

4+
NOTE: If you are applying customizations to the application module detection described xref:fundamentals.adoc#customizing-modules[here], you need to move those into your production sources, unless already present there, to make sure that those are considered by the features described here.
5+
46
Spring Modulith provides support to expose architectural information about your system as a Spring Boot actuator endpoint as well as observing the interaction between application modules by capturing metrics and traces.
57
As a production-ready application is likely to require both, the most convenient way to activate those features is to use the Spring Modulith Insight starter as follows:
68

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

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,8 @@
44
The functionality described in previous chapters have all used the application module arrangement in either testing scenarios for verification and documentation purposes or were general support functionality that help to loosely couple modules but did not work with the application module structure directly.
55
In this section we are going to describe Spring Modulith's support for module initialization at application runtime.
66

7+
NOTE: If you are applying customizations to the application module detection described xref:fundamentals.adoc#customizing-modules[here], you need to move those into your production sources, unless already present there, to make sure that those are considered by the features described here.
8+
79
[[setup]]
810
== Setting up Runtime Support for Application Modules
911

0 commit comments

Comments
 (0)