Commit Graph

269 Commits

Author SHA1 Message Date
Oliver Drotbohm
d7ef7c9dea GH-198 - Upgrade to Spring Boot 3.1 snapshots.
Switch verification of mock beans as Mockito 5.3.0 uses a different MockMaker by default that doesn't add the explicit interface we have previously checked for.

Remove obsolete init- and destroy method declarations from service bean definitions in examples.
2023-05-02 14:32:41 +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
60ce7da56e GH-189 - Prepare next development iteration. 2023-05-02 12:28:30 +02:00
Oliver Drotbohm
9d1180017e GH-189 - Release version 0.6.0. 2023-05-02 12:28:29 +02:00
Oliver Drotbohm
594c22a4c8 GH-181 - Create dedicated submodule for examples.
Move already existing example underneath that. Added examples for JDBC- and MongoDB-based event publication registry setups.
2023-05-01 22:44:54 +02:00
Oliver Drotbohm
94093a3081 GH-175 - More defensive auto-configuration of MongoDB transactions.
We now opt out of defining bean definitions for MongoTransactionManager and TransactionTemplate if user defined. We also make sure to run before the EnableTransactionManagementConfiguration to make sure that will see our auto-configured MongoTransactionManager.
2023-05-01 22:30:29 +02:00
Oliver Drotbohm
c46b9b958d GH-196 - Upgrade to Hibernate 6.2.2 for JPA event publication registry tests. 2023-05-01 21:56:54 +02:00
Oliver Drotbohm
f0c38e1085 GH-194 - Fix combined condition to enable JDBC database initialization. 2023-05-01 21:56:54 +02:00
Oliver Drotbohm
0fbd776239 GH-194 - Switch to spring.modulith.events.jdbc.… namspace for data initialization properties.
The legacy ones are still supported but the data initialization properties have been moved to a new spring.modulith.events.jdbc.… namespace.
2023-05-01 21:33:49 +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
6dabfb425b GH-191 - Prevent premature access of ApplicationContext from ParameterResolver implementations.
We now avoid accessing the ApplicationContext from a BeforeAllCallback as this might cause the context initialization before other extensions had time to kick in.
2023-04-30 22:35:14 +02:00
Oliver Drotbohm
c111e41f2b GH-189 - Upgrade build plugins to latest versions. 2023-04-30 22:35:14 +02:00
Oliver Drotbohm
4656f82089 GH-187 - Do not include non-exposed Spring beans that implement interfaces in Application Module Canvas by default.
We now properly check whether one of a Spring bean's implemented interfaces is exposed by the module before including it in the default rendering of the Application Module Canvas.
2023-04-30 22:35:14 +02:00
Oliver Drotbohm
0b6dccf334 GH-190 - Introduce @EnableScenarios.
The dedicated annotation allows using Scenario as test parameter in @SpringBootTest-based integration tests, too.

ScenarioParameterResolver now throws a better error message if a TransactionTemplate bean is missing from the ApplicationContext.
2023-04-30 22:35:14 +02:00
Oliver Drotbohm
c9729bded0 GH-186 - Workaround for invalid application listener matching in AbstractApplicationEventMulticaster.
AbstractApplicationEventMulticaster.supportsEvent(…) currently doesn't properly match unresolved, generic ApplicationEvents (see [0]). We now work around this problem by additionally matching the raw event types in a custom override of supportsEvent(…).

[0] https://github.com/spring-projects/spring-framework/issues/30399
2023-04-30 22:35:14 +02:00
Oliver Drotbohm
b3b06614f9 GH-180 - Update to Spring Framework 6.0.8 for Javadoc references. 2023-04-30 22:35:14 +02:00
Oliver Drotbohm
70ed1678c2 GH-188 - Upgrade to jMolecules BOM 2022.3.0. 2023-04-30 22:35:14 +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
3c52dbd0b3 GH-188 - Upgrade to jMolecules 2022.3.0 snapshots. 2023-04-28 20:23:40 +02:00
Oliver Drotbohm
394e87337b GH-187 - Unit tests for Spring Data repository detection.
Both imperative and reactive flavours.
2023-04-28 20:22:27 +02:00
Oliver Drotbohm
bb800ba046 GH-185 - Additional simplification of delayed event verification on Scenarios. 2023-04-25 14:34:23 +02:00
Oliver Drotbohm
3a923519f2 GH-185 - Allow verification of events after method invocation stimulus. 2023-04-24 17:31:21 +02:00
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