Commit Graph

247 Commits

Author SHA1 Message Date
Oliver Drotbohm
b834c255ec GH-184 - Enable asynchronous support when using event publication registry.
Unless manually configured we now configure @EnableAsync by default in the event publication registry module.
2023-04-24 14:43:37 +02:00
Oliver Drotbohm
29a5148dcb GH-181 - Delay lookup of EventPublicationRegistry as much as possible.
We now avoid to initialize the EventPublicationRegistry in the ApplicationEventMulticaster unless there is a transactional event listener interested in the event to be published. This should help us avoid premature initialization of the registry for application events published early in the application context bootstrap phase.
2023-04-23 23:56:23 +02:00
Oliver Drotbohm
fbd2c2e66f GH-182 - Use dedicated SliceAssignment to verify modularity.
The previous modularity verification arrangement assumed the default module detection strategy to be used. To properly support alternative implementations during the verification we now use a dedicated SliceAssignment implementation that assigns types to slices identified by the module they are located in.
2023-04-23 23:24:02 +02:00
Oliver Drotbohm
d9f298c96a GH-183 - Improvements in named interface declarations.
Type based named interfaces on types declared in a module's API package still caused the type to be included in the unnamed interface. This is now fixed by explicitly removing named interface types from the unnamed interface.

We now also detect API package types assigned to a named interface without an explicit name as the package name defaulting doesn't work in this case.

Furthermore, named interfaces are now sorted alphabetically to make the unnamed one always appear first.
2023-04-23 23:21:00 +02:00
Oliver Drotbohm
0e6c41b57c GH-180 - Upgrade to Spring Boot 3.0.6. 2023-04-20 16:31:06 +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
Oliver Drotbohm
daee88a227 GH-177 - Javadoc polishing. 2023-03-31 13:44:06 +02:00
Oliver Drotbohm
2454ecbc4b GH-177 - Named interfaces names now default to the local package name.
Both package- and type-level declarations now use the local package name as the named interface's name. This allows to, at the same time, easily declared named interfaces based on packages but also a nice decoupling of the interface definition and the package layout as individual types can be assigned to such interfaces no matter where they are actually declared.
2023-03-31 13:34:21 +02:00
Oliver Drotbohm
6d2fdd6fdc GH-173 - Polishing.
@ApplicationModuleTest is now explicitly declared to only be usable on types, documented and inherited.
2023-03-27 17:56:12 +02:00
Oliver Drotbohm
822febd00e GH-173 - Support for @ApplicationModuleTest in JUnit 5 nested test classes.
We now use Spring Test Context's TestContextAnnotationUtils to lookup the @ApplicationModuleTest annotation to eventually bootstrap an ApplicationModules instance. That ensures that we find the annotation on JUnit 5's @Nested classes.
2023-03-27 17:56:04 +02:00
Oliver Drotbohm
281da55eac GH-172 - Prepare next development iteration. 2023-03-24 10:24:47 +01:00
Oliver Drotbohm
d5bdff3f77 GH-172 - Release version 0.5.1. 2023-03-24 10:24:47 +01:00
Oliver Drotbohm
995d10591b GH-169 - More defensive bean definition declaration for the ApplicationStartedEvent listener.
Altered the bean definition to rather only refer to a ListableBeanFactory and only lookup the ApplicationModulesRuntime and ApplicationModuleListeners when the ApplicationStartedEvent is handled.
2023-03-23 22:55:25 +01:00
Oliver Drotbohm
19707dd54a GH-169 - Remove logback.xml from Spring Modulith Runtime's production sources. 2023-03-23 22:43:35 +01:00
Oliver Drotbohm
74c772dfa7 GH-171 - Upgrade to Spring Boot 3.0.5. 2023-03-23 21:42:44 +01:00
Oliver Drotbohm
c58497979d GH-170 - Improve log output for ApplicationModule.
We now consider whether a type is exposed by a module to determine whether it is reported as public (+) or contained (o) type.
2023-03-23 13:00:56 +01:00
Oliver Drotbohm
f0aaca2917 GH-164 - Prepare next development iteration. 2023-03-08 11:35:15 +01:00
Oliver Drotbohm
50dd8969fb GH-164 - Release version 0.5.0. 2023-03-08 11:35:14 +01:00
Oliver Drotbohm
5ba5db07a6 GH-159 - Unit tests for JDBC schema resolution. 2023-03-08 10:47:52 +01:00
Michael Weirauch
0e2e404308 GH-159 - Fix JDBC schema loading from classpath in servlet environments. 2023-03-08 10:47:14 +01:00
Oliver Drotbohm
bb760e970c GH-163 - Fix wrong property name in integration test configuration. 2023-03-08 09:51:28 +01:00
Oliver Drotbohm
c978435cfb GH-158 - Polishing.
Slightly more detailed docs on activating the schema initialization.
2023-03-07 16:37:52 +01:00
Michael Weirauch
23e4bc5698 GH-158 - Add configuration metadata for spring-modulith-events-jdbc 2023-03-07 16:37:48 +01:00
Oliver Drotbohm
cac1a71dd2 GH-163 - Change spring.modulith.events.schema-initialization.enabled to spring.modulith.events.jdbc-schema-initialization.enabled. 2023-03-07 16:30:29 +01:00
Oliver Drotbohm
cf65759344 GH-162 - Upgrade to jMolecules 2022.2.4. 2023-03-07 15:01:15 +01:00
Oliver Drotbohm
22ff53d098 GH-160 - Polishing.
Moved the message population for the failure analyzer to the exception to be able to give more actionable feedback and educated users on the cause of the problem.
2023-03-07 13:08:25 +01:00
Michael Weirauch
595a052702 GH-160 - Prevent missing ArchUnit runtime dependency.
Adds ArchUnit as an explicit dependency to spring-modulith-runtime. Registers auto-configuration that throws an exception in case ArchUnit is missing from the classpath (as it is likely that it's declared as test scope dependency only) and a corresponding failure analyzer to give guidance on how to solve the problem.
2023-03-07 13:07:24 +01:00
Oliver Drotbohm
e16efe92d2 GH-161 - Add BOM entries for Spring Modulith Events JDBC and MongoDB. 2023-03-05 11:16:42 +01:00
Oliver Drotbohm
d0ffcddd29 GH-157 - Improve aggregate lookup.
We now directly collect all aggregate types instead of looking up entities first.
2023-03-04 00:21:22 +01:00
Oliver Drotbohm
6e16cbafd1 GH-154 - Upgrade to Spring Boot 3.0.4. 2023-03-03 23:54:06 +01:00
Oliver Drotbohm
52323720a8 GH-156 - Polish example.
Add sample documentation. Reintroduce Lombok to avoid boilerplate. Use jMolecules DDD abstractions to represent aggregates. Use Scenario API in test cases.
2023-03-03 23:50:59 +01:00
Oliver Drotbohm
45d51dd9d5 GH-149 - Tighten test cases for event publication registry auto-configuration.
Properly test for the activation of the auto-configuration as this seems to have become broken with d9e761e.
2023-03-03 20:24:31 +01:00
Oliver Drotbohm
ac52f51ad4 GH-148 - Overhaul of the reference documentation ob actuators and observability.
Renamed top-level section to "Production-ready features" to align with Spring Boot. Moved actuator support before observability one. Introduced introductory section to showcase the Insight starter.
2023-03-03 18:01:38 +01:00
Oliver Drotbohm
802ac39d69 GH-152 - Add Insight starter to starter overview in reference docs. 2023-03-03 18:00:15 +01:00
Oliver Drotbohm
46c4419141 GH-155 - Upgrade to embedded MongoDB 4.6.1 for integration tests. 2023-03-03 14:08:42 +01:00
Oliver Drotbohm
e6e4e43603 GH-154 - Upgrade to Spring Framework 6.0.6 for Javadoc references. 2023-03-03 14:06:12 +01:00
Oliver Drotbohm
79b73bca0f Gh-153 - Upgrade to Spring Asciidoctor backends 0.0.5. 2023-03-03 14:05:07 +01:00
Oliver Drotbohm
735be03f0d GH-132 - Polishing.
Add core starter to BOM.
2023-03-03 13:55:28 +01:00
Oliver Drotbohm
14123293b6 GH-152 - Introduce starter to include actuator & observability features. 2023-03-03 13:55:01 +01:00
Oliver Drotbohm
d9e761e50b GH-149 - Polishing. 2023-02-27 10:41:49 +01:00
Oliver Drotbohm
ce264aaf96 GH-150 - Scenario now execute stimulus within new transaction.
To make sure that we trigger transactional event listeners from Scenario based integration tests, we trigger stimulus executions using transactions configured to require a new transaction. This makes sure that Scenarios work in integration tests using @Transactional, of course circumventing the default rollback behavior of those transactions. There's no other way to implement this as we *need* to commit a transaction to trigger the delivery of transaction-bound events.

Fixed a bug in the handling of Scenario.stimulus(Supplier<T>) as for this, the Supplier handed into the method had not been executed transactionally at all.
2023-02-26 20:26:53 +01:00
Oliver Drotbohm
47a8a7fa77 GH-149 - Default configuration to await task termination for 2 seconds.
We now tweak the task executor to await termination for 2 seconds unless explicitly disabled or any of the Spring Boot task executor shutdown properties being set. This makes sure that long running application module listeners do not access resources already in shutdown when running integration tests, in which the context could already shutdown while the listener is still running.
2023-02-26 11:50:15 +01:00
Oliver Drotbohm
c51ac5c6fb GH-147 - Prepare next development iteration. 2023-02-24 16:47:15 +01:00
Oliver Drotbohm
13c9f96448 GH-147 - Release version 0.4.1. 2023-02-24 16:47:14 +01:00
Oliver Drotbohm
e24bdaf80d GH-145 - Polishing. 2023-02-24 16:42:06 +01:00
Oliver Drotbohm
2b6298e214 GH-145 - Make sure the async ApplicationModulesRuntime bootstrap doesn't prevent shutdown.
We now use an AsyncTaskExecutor to bootstrap the ApplicationModules instance at startup asynchronously and - at the same time - do not block an explicit application shutdown. This also more idiomatic compared to using an ExecutorService directly.
2023-02-24 16:41:48 +01:00
Oliver Drotbohm
815df2552d GH-146 - Upgrade to jMolecules 2022.2.3. 2023-02-24 16:31:40 +01:00
Oliver Drotbohm
a4ebd569ad GH-144 - Update starter reference table in documentation. 2023-02-24 12:26:38 +01:00
Oliver Drotbohm
64a5929367 GH-143 - Prepare next development iteration. 2023-02-23 23:26:25 +01:00
Oliver Drotbohm
3e705a162e GH-143 - Release version 0.4.0. 2023-02-23 23:26:25 +01:00