Commit Graph

180 Commits

Author SHA1 Message Date
Oliver Drotbohm
9428d3be87 GH-132 - Introduce core starter POM.
We now ship a spring-modulith-starter-core that includes dependencies that will typically be used for core runtime support, including the spring-modulith-moments and …-api artifacts in compile scope (so that production code can refer to them) as well as both the …-core and …-runtime artifacts in runtime scope (primarily for ApplicationModuleListener support).

The persistence-technology-specific event publication registry starters now refer to that core starter.
2023-02-11 09:14:24 +01:00
Oliver Drotbohm
71f928f5b0 GH-130 - Polishing.
Organized imports.
2023-02-03 11:09:07 +01:00
Morten Lilbæk Pedersen
8b913bc536 GH-129 - Fix incorrect package name in reference documentation.
Use correct ApplicationModuleDetectionStrategy package name
2023-02-03 10:53:48 +01:00
Oliver Drotbohm
c4fe271689 GH-130 - Fall back to annotated class' name as system name. 2023-02-03 10:52:14 +01:00
Oliver Drotbohm
8e637ecdf9 GH-126 - Upgrade to latest Structurizr. 2023-01-26 15:38:33 +01:00
Oliver Drotbohm
ff8df678e7 GH-125 - More detailed logging of pending event publication lookup on startup. 2023-01-26 09:30:50 +01:00
Oliver Drotbohm
3c25958edc GH-123 - Prepare next development iteration. 2023-01-20 10:16:34 +01:00
Oliver Drotbohm
43bea11041 GH-123 - Release version 0.3.0. 2023-01-20 10:16:34 +01:00
Oliver Drotbohm
7649a84254 GH-122 - Default to enable observability features. 2023-01-20 10:07:50 +01:00
Oliver Drotbohm
b187a7a71d GH-109 - Upgrade to Spring Boot 3.0.2. 2023-01-20 09:08:02 +01:00
Oliver Drotbohm
58ad0a33e7 GH-120 - Use *.puml as default file extension for PlantUML files generated. 2023-01-19 16:12:34 +01:00
Oliver Drotbohm
3fba520e9c GH-121 - Added new modules to reference documentation. 2023-01-19 15:18:34 +01:00
Oliver Drotbohm
868fddca50 GH-119 - Added package-info.java for util package. 2023-01-19 15:17:29 +01:00
Oliver Drotbohm
090ddc6fba GH-119 - Improve rendering of application modules structure as JSON.
Introduced ApplicationModulesExporter to render an ApplicationModules instances as JSON directly. To avoid a dependency to a JSON library and as we only have to be able to render rather simple arrangements, we just build up the JSON string ourselves.

ApplicationModulesEndpoint now caches the structure calculated once to avoid repeated work.
2023-01-18 18:39:09 +01:00
Oliver Drotbohm
9082ca27bb GH-118 - Reworked infrastructure to complete event publications.
Previously we used a dedicated BeanPostProcessor to decorate beans that expose transactional event listeners with an interceptor to mark event publications as completed if the method invocation completes successfully. We now have simplified the arrangement by using Spring's auto-proxy creation and registering an Advisor implementation. This allows us to properly and reliably  order the interceptor between the async one (goes before ours) and the transactional one (goes after ours). Also, this significantly simplifies the implementation of the interceptor as we can assume only commit listener methods being intercepted in the first place.
2023-01-16 21:57:45 +01:00
Oliver Drotbohm
6f5de96dcc GH-117 - Polishing. 2023-01-13 17:42:51 +01:00
Oliver Drotbohm
cacf14748c GH-117 - Test starter now includes the Spring Boot one and Awaitility. 2023-01-13 17:42:43 +01:00
Oliver Drotbohm
6616aaaffa GH-116 - PublishedEvents now sees events from asynchronous event listeners as well.
The ApplicationListener we deploy to capture events published  during a test method execution now uses an InheritableThreadLocal so that events published on threads spawned from the main test execution thread also end up in the PublishedEvents instance prepared for the test method.

Also, the registration of that particular event listener avoids duplicate registrations by inspecting the application context in use for the test method execution for an already registered listener, falling back to registering one.
2023-01-13 16:13:34 +01:00
Oliver Drotbohm
c4321c5305 GH-111 - Link to Javadoc from project metadata in reference documentation. 2023-01-12 20:07:13 +01:00
Oliver Drotbohm
e8cdaa4977 GH-115 - Polish up example.
Upgraded to Spring Boot 3.0.1. Added starters for web and added configuration to expose applicationmodules actuator. Tweak logs to follow Boot's default configuration. Removed obsolete milestone repository.
2023-01-12 18:08:19 +01:00
Oliver Drotbohm
98eeb284b3 GH-110 - Remove obsolete plugin repository declaration.
It was only used to access the Spring Asciidoctor Backends, but starting with version 0.0.4, the JAR is available from Maven Central.
2023-01-12 16:57:59 +01:00
Oliver Drotbohm
54b8ffa566 GH-111 - Optionally depend on Spring Boot autoconfiguration to keep Javadoc happy.
ModulithMetadata refers to SpringBootApplication in its Javadoc, which requires us to have the JAR on the classpath for Javadoc creation as the linting otherwise fails.
2023-01-12 16:50:23 +01:00
Oliver Drotbohm
5c34886907 GH-114 - Rename ….modulith.model to ….modulith.core. 2023-01-12 16:34:07 +01:00
Oliver Drotbohm
0d009f06c9 GH-111 - Package and publish Javadoc.
A lot of Javadoc polish. Not done yet.
2023-01-12 16:20:20 +01:00
Oliver Drotbohm
9a01404ce2 GH-113 - Use colored inline icons in reference documentation. 2023-01-12 01:26:14 +01:00
Oliver Drotbohm
711325b613 GH-112 - Enable actuators in example project. 2023-01-12 01:22:37 +01:00
Oliver Drotbohm
05643bba9c GH-110 - Upgrade to Spring Asciidoctor Backends 0.0.4. 2023-01-12 01:08:19 +01:00
Oliver Drotbohm
9ce6bf23ae GH-14 - Remove Lombok from production sources.
Polished a lot of Javadoc.
2023-01-12 01:05:35 +01:00
Oliver Drotbohm
20554c3af3 GH-103 - Reference documentation for ApplicationModuleInitializer. 2023-01-06 16:23:20 +01:00
Oliver Drotbohm
5f25974f0d GH-107 - Improve runtime support configuration setup.
The configuration classes declaring SpringBootApplicationRuntime and ApplicationModulesRuntime beans now describe them as infrastructure beans so that they do not get reported as eagly initialized as their initialization will be triggered when creating the BeanPostProcessors our observability support is based on.

The configuration of the observability support now consistently refer to ApplicationModulesRuntime directly and to the Tracer instance via a supplier as the latter is only needed during the actual component invocation while the former is already needed to decide whether to decorate the instances in the first place. Simplify the inheritance arrangement underneath ModuleTracingSupport.

The logging adapter for ApplicationModuleInitializers now properly unwraps proxy types so that the log output uses the user classes properly.
2023-01-05 20:00:58 +01:00
Oliver Drotbohm
262efb5828 GH-106 - Avoid intercepting Object and proxy-related methods for module interaction tracing.
We now skip Object methods and ones declared on Spring's Advised or TargetClassAware types when intercepting invocations to trigger a module entry.
2023-01-05 20:00:54 +01:00
Oliver Drotbohm
91c746c63c GH-105 - Prevent Testcontainers-based tests from failing if no Docker is available. 2023-01-05 16:39:26 +01:00
Oliver Drotbohm
ae5475d351 GH-87 - Make sure actuator endpoint outputs modules in topological order.
More fundamental modules are now rendered first as we use a LinkedHashMap as primary data structure.
2023-01-05 16:24:45 +01:00
Oliver Drotbohm
d8463bb84b GH-102 - Avoid topological sorting to fail on cyclic module graphs.
We now fall back to the default non-topological ordering in case the application module graph contains cycles.
2023-01-05 11:21:14 +01:00
Oliver Drotbohm
30203ecca8 GH-104 - Polish log output for test execution.
Also added ApplicationModules.toString().
2023-01-05 10:21:42 +01:00
Oliver Drotbohm
d9aedb8ebf 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.
2023-01-05 10:21:42 +01:00
Oliver Drotbohm
a7e033172b GH-102 - ApplicationModules now allows traversing modules in topological order.
We now optionally integrate with the JGraphT library to calculate the topological order of modules based on their dependency structure. That order is then exposed in ApplicationModules' iteration and via ….getComparator().

Renamed FormattableJavaClass to FormattableType and allow it to be created from a plain Class as well.
2023-01-05 10:21:36 +01:00
Oliver Drotbohm
dde02ae257 GH-100 - Update reference documentation. 2023-01-03 13:23:17 +01:00
Oliver Drotbohm
3b1bde5c36 GH-100 - Polishing. 2023-01-03 08:50:27 +01:00
Oliver Drotbohm
5d285e0e03 GH-100 - Introduce AssertablePublishedEvents.
In case AssertJ is on the classpath, test cases using the PublishedEventsExtension (for example, implicitly activated via @ApplicationModuleTest) can get an AssertablePublishedEvents injected into the method. In contrast to the original PublishedEvents, that one acts as AssertProvider so that it can be used in assertThat(…).… expressions to verify application events published.

Polished API in PublishedEvents for a more consistent experience.
2023-01-03 02:44:01 +01:00
Oliver Drotbohm
4e13fbf7f8 GH-99 - Extend license headers to 2023. 2023-01-02 18:12:29 +01:00
Oliver Drotbohm
a343f6eac3 GH-98 - Upgrade checkout and setup-java actions to V3. 2022-12-31 13:14:11 +01:00
Oliver Drotbohm
652a7b8528 GH-97 - Rework calculation of coordinates for WeekHasPassed events.
They now also work correctly when shifting time across a year's end.
2022-12-31 13:07:43 +01:00
Oliver Drotbohm
2d933d07c5 GH-92 - Prepare next development iteration. 2022-12-23 17:32:38 +01:00
Oliver Drotbohm
888055cf7c GH-92 - Release version 0.2.0. 2022-12-23 17:32:37 +01:00
Oliver Drotbohm
86d03864cc GH-92 - Enable deployment for distribution module in documentation profile.
Required due to a change in Artifactory Maven Plugin behavior [0].

[0] https://github.com/jfrog/artifactory-maven-plugin/issues/39
2022-12-23 17:16:34 +01:00
Oliver Drotbohm
e50894c973 GH-91 - General build plugin updates.
AsciidoctorJ 2.5.7.
2022-12-23 16:53:32 +01:00
Oliver Drotbohm
986ee1bb85 GH-90 - Upgrade to Flapdoodle MongoDB 4.3.2 (Boot 3 compatible).
Allows us to get rid of the custom MongoDB infrastructure test configuration.
2022-12-23 16:53:29 +01:00
Oliver Drotbohm
1c6e70b453 GH-89 - Upgrade Artifactory Maven Plugin to 3.5.1. 2022-12-23 16:10:12 +01:00
Oliver Drotbohm
25f789f298 GH-80 - Renamed ApplicationModuleIntegrationListener to ApplicationModuleListener. 2022-12-23 15:43:15 +01:00