Commit Graph

87 Commits

Author SHA1 Message Date
Lukas Dohmen
597a483fd5 GH-743 - Correct spelling in documentation. 2024-08-23 11:25:38 +02:00
Oliver Drotbohm
662adac088 GH-578 - Improve nesting code sample in reference documentation. 2024-08-16 17:14:40 +02:00
Oliver Drotbohm
7838204c25 GH-578 - Support for nested application modules.
The ApplicationModules bootstrap now triggers the module base package detection, followed by a new, additional pass of detecting nested application module packages. Those packages are now added to the ones we create ApplicationModule instances for and also handed into the module instance creation step as exclusions to make sure that parent modules do not include code residing in sub-modules.

The bootstrap of ApplicationModules now uses a dedicated ApplicationModuleSource to allow calculating a default module name relative to the application base package.

Each module now operates on the Classes instance obtained from the JavaPackage instance that constitutes the module's base package but filtered by the given exclusions.
2024-08-16 17:09:51 +02:00
Raed
75b3ff4cac GH-685 - Introduce spring.modulith.events.jdbc.schema to allow defining the database schema for the event_publication table. 2024-07-08 23:12:26 +02:00
Oliver Drotbohm
e7515cc1dc GH-638 - Polishing. 2024-07-08 17:21:08 +02:00
Cora Iberkleid
d32ef518e0 GH-638 - Create aggregating Asciidoc document including all files generated. 2024-07-08 17:17:16 +02:00
adrien-lesur
a3d44689ba GH-687 - Fix broken link to Spring Data Domain Event publishing. 2024-07-05 10:52:24 +02:00
Dimitrios Begnis
a821810783 GH-670 - Add documentation for Neo4j modules. 2024-06-19 16:18:11 +02:00
Oliver Drotbohm
7547bc2cad GH-652 - Polishing. 2024-06-06 16:23:58 +02:00
Oliver Drotbohm
ed1cb3fc91 GH-652 - Allow to configure the ApplicationModuleDetectionStrategy via a configuration property.
We now expose a configuration property spring.modulith.detection-strategy that can take either of the two prepared values "direct-sub-packages" (default) or "explicitly-annotated", or a fully qualified class name of the strategy to use.

Removed ApplicationModuleStrategies enum to avoid exposing the enum values as additional implementations. Those are now held as inline lambda expression in the factory methods on ApplicationModuleStrategy. Extracted the lookup of the strategy to use into ApplicationModuleDetectionStrategyLookup for easier testability.
2024-06-06 15:45:57 +02:00
Oliver Drotbohm
51c5f0bf42 GH-601 - Support for wildcard references to named interfaces in explicitly defined allowed application module dependencies.
When defining allowed application module dependencies to named interfaces, the asterisk can now be used to allow referencing all named interfaces declared by the target module.
2024-05-16 16:03:14 +02:00
dowenliu-xyz
551e117113 GH-588 - Fix a spell mistake in docs. 2024-05-14 12:34:29 +02:00
Oliver Drotbohm
4be7626855 GH-584 - Fix configuration property metadata for JSON support in Kafka and RabbitMQ. 2024-05-08 10:33:21 +02:00
Oliver Drotbohm
36ec890de8 GH-550 - Rearrange sections in reference doc.
The exclusion of types from the Application Modules model is now described in the section about the ApplicationModules type already. That general section is now located before the discussion of simple and advanced modules.

The verification section now mentions the behavior for open modules as well.
2024-04-19 17:32:19 +02:00
Oliver Drotbohm
6de6f46ada GH-550 - Polishing. 2024-04-10 19:08:58 +02:00
Stephan Harbauer
1dd7238ff7 GH-550 - Add section on how to exclude packages from application module detection. 2024-04-10 19:08:47 +02:00
sant0s
d9bbd7ca45 GH-540 - Improve reference documentation. 2024-03-28 11:36:12 +01:00
Oliver Drotbohm
1949c415c4 GH-528 - Add section on @Modulithic to reference documentation. 2024-03-19 15:51:51 +01:00
emanuel.trandafir
3d68f1a588 GH-521 - Improve reference docs.
Making the starters section more visible. Fixed links related to testing.
2024-03-05 19:41:28 +01:00
Oliver Drotbohm
5f7e6a2479 GH-522 - Support for package info types.
Introduce @PackageInfo annotation to allow marking a types as alternative to Java's native package-info.java so that annotation lookups on a JavaPackage will also find annotations placed on that type. Useful to declare package scoped metadata like @ApplicationModule and @NamedInterface for languages that do not support packages well enough (read: Kotlin).
2024-03-05 09:55:34 +01:00
Oliver Drotbohm
f3c111f769 GH-284 - Support for open application modules.
Application modules can now be declared as open, which causes internal components being exposed for access by other modules.
2024-02-29 12:58:49 +01:00
Stefano Cordio
b40b45379e GH-499 - Fixes and improvements for Fundamentals section. 2024-02-14 15:19:05 +01:00
Oliver Drotbohm
2f96c75377 GH-442 - Fix invalid reference in event externalization reference docs. 2024-01-10 15:15:45 +01:00
Niki Micallef
f81c155011 GH-383 - Update runtime.adoc by completing intro paragraph.
Original pull request: GH-384.
2023-11-24 15:32:45 +01:00
Oliver Drotbohm
792b69c25e GH-355 - Polish Kotlin code samples in event section of reference documentation. 2023-11-02 08:26:00 +01:00
Maciej Walkowiak
d95da874bd GH-344 - Support for event externalization into AWS SNS and SQS.
Additional event externalization implementations for AWS SNS and SQS.

Original pull request: GH-350.
2023-11-02 08:22:28 +01:00
Oliver Drotbohm
576b8f5074 GH-342 - Allow disabling event externalization.
We now expose spring.modulith.events.externalization.enabled that can be set to false to disable the event externalization completely. Useful in test cases, for example.
2023-10-23 12:22:42 +02:00
Devashish Bhattacharjee
9b79e09729 GH-256 - Added Kotlin variant for Java code. 2023-10-17 10:22:02 +02:00
Oliver Drotbohm
cc99f9d357 GH-325 - Add mission statement to reference documentation. 2023-10-16 08:32:26 +02:00
Oliver Drotbohm
51f205af59 GH-324 - Add Neo4j-specific configuration properties to reference documentation. 2023-10-16 08:31:35 +02:00
Devashish Bhattacharjee
31a570c87b GH-255 - Add Gradle snippets for build related samples to the reference documentation. 2023-09-19 10:02:12 +02:00
Rob Winch
c43a338a99 GH-297 - Update to antora-ui-spring v0.3.7. 2023-09-19 09:00:01 +02:00
Oliver Drotbohm
0d563dde1e GH-285 - Add diagram extension to main branch Antora playbook. 2023-09-12 11:09:53 +02:00
Rob Winch
56036d151a GH-285 - Migrate documentation to Antora. 2023-09-12 09:21:48 +02:00
Oliver Drotbohm
9b0062f354 GH-248 - Support to automatically externalize events.
We now allow externalizing application events to a variety of message brokers through the addition of Spring Modulith modules for Kafka, AMQP and JMS to a user project's classpath. Which events shall be externalized and how they're supposed to be routed to the message broker can be configured through either annotations or via a configuration API declared as Spring bean.

In case Jackson is on the classpath, we also add auto-configuration to use a Boot-configured ObjectMapper instance with the corresponding message broker client APIs to properly serialize and deserialize messages to JSON.
2023-09-07 16:29:10 +02:00
Oliver Drotbohm
971a143436 GH-294 - Introduce user API to deal with completed and incomplete event publications.
Introduce a new spring-modulith-events-api artifact to contain types that are supposed to be used by application code to deal with event publications. `EventPublication` was moved into that artifact and got everything non infrastructure related extracted from it's previous incarnation. That in turn has been renamed to `TargetEventPublication`.

`CompletedEventPublications` exposes API to allow purging completed publications either by a given predicate or age (in `Duration`). The interface is implemented by `DefaultEventPublicationRegistry` and thus subject for dependency injection into user code. It primarily delegates to the corresponding methods on `EventPublicationRepository` adapting the given `Duration`s to the `Clock` instance already held internally.

`IncompleteEventPublications` allows triggering the re-submission of incomplete publications by the same criteria as `CEP`. The interface is implemented by `PersistentApplicationEventMulticaster` and this subject for dependency injection into user code.

`EventPublicationRepository` now also allows publications to be deleted by identifiers. The existing implementations have been adapted and batch the requests for every 100 identifiers to prevent a list too large to run into limitations of the underlying data store.

Polished transactional metadata declaration in JPA- and MongoDB-based repository implementations.

Tightened nullability expressions here and there.
2023-09-04 15:24:37 +02:00
Oliver Drotbohm
1fe681bffc GH-289 - Polishing. 2023-09-04 09:55:04 +02:00
Karl Heinz Marbaise
4af54d09a6 GH-289 - Project version is not correctly inserted into the documentation.
Original pull request: GH-290.
2023-09-04 09:54:56 +02:00
Oliver Drotbohm
3aa6a12b21 GH-288 - Clarify event republication behavior on restart. 2023-09-04 09:46:33 +02:00
Oliver Drotbohm
cec759af0c GH-268 - Rename actuator endpoint to modulith.
To align with the conventions established by Spring Boot.
2023-08-15 09:30:00 +02:00
Yossi Spektor
0b110f70c2 GH-220 - Documentation polish. 2023-08-10 08:37:44 +02:00
Oliver Drotbohm
290b1c899b GH-257 - Add appendix listing all configuration properties exposed. 2023-08-09 21:21:18 +02:00
Oliver Drotbohm
04187a1706 GH-243 - Add section on how to customize the Clock instance to be used to determine event publication dates. 2023-08-01 16:10:49 +02:00
Oliver Drotbohm
c23c26bd78 GH-228 - Be explicit about which jMolecules ArchUnit rules are executed as part of our verification. 2023-08-01 16:10:41 +02:00
Oliver Drotbohm
60dad66637 GH-224 - Improve documentation of our examples.
Added a readme to briefly describe what's contained in the examples. Added Maven Wrapper to all example projects.

Limit the dependencies of the JDBC based example to sole Spring JDBC (dropping the Spring Data integration as it's not needed for the example. Remove unused, JPA-related property
2023-07-05 13:52:56 +02:00
Yossi Spektor
85ce443ce5 GH-213 - Specify proper transactional propagation type in docs.
The default propagation type of @Transactional is Propagation.REQUIRED. That, however would reuse the already running committed transaction which is not the correct behavior.

Related ticket: #80.
2023-06-23 12:49:06 +02:00
Oliver Drotbohm
596e8828a2 GH-197 - Promote project out of experimental status.
Set version number to 1.0.0-SNAPSHOT. New group id is org.springframework.modulith. Also adapt links to new project home.
2023-05-02 14:32:32 +02:00
Oliver Drotbohm
646722beaf GH-175 - Auto-configure transactions for MongoDB by default.
As the Event Publication registry only works in transactional environments, we should enable them for MongoDB by default. This will require a replica setup for the MongoDB instance the application interacts with.
2023-05-01 21:28:08 +02:00
Oliver Drotbohm
16bc4b3a60 GH-192 - Add default component groupings for jMolecules architecture abstractions.
We now register default groupings for the architectural abstractions [0] in case they are available on the classpath but still fall back to the standard Spring Framework ones if not. In other words, if you e.g. use the jmolecules-hexagonal-architecture ones, types and packages annotated with @Port will cause the affected types to appear under a "Ports" section in the "Spring components" row in the Application Module Canvas.

[0] https://github.com/xmolecules/jmolecules#available-libraries-1
2023-04-30 22:35:14 +02:00
Oliver Drotbohm
cd76c96250 GH-165 - Introduce ScenarioCustomizer extension.
We now provide a ScenarioCustomizer that can be used to prepare Scenario instances for test methods with a common customizer. This avoids the need to call ….customize(…) for all Scenarios declared in a test class with the same logic.
2023-04-20 14:15:10 +02:00