Repository navigation
v0.12.0
The last minor release before 1.0. It carries out the decisions that the 1.0 freeze checklist left open, while a minor release may still break, so that 1.0 itself only freezes. A cancelled request is answered with 503 and REQUEST_CANCELLED instead of 500, the one breaking change. ddk-db-starter is tested on PostgreSQL and MySQL and is no longer experimental, and ddk-seata-starter is deprecated ahead of its removal in 1.0. Publication metrics are sampled in the background, so their cost no longer follows the scrape rate. Native images are verified for the Redis-backed starters, projections and the publication registry, projects generated on JDK 23 and later compile Lombok, an optional ArchGuard rule keeps configuration classes outside the layers to wiring, and every starter's README starts with a 30-second setup and ends with its common errors. The upgrade guide lists the steps.
Breaking
- A request whose thread is interrupted, which
AggregateLocksand@AggregateLockreport asCancellationExceptionsince 0.11.0, is answered byBaseExceptionHandlerwith 503 and the new error codeREQUEST_CANCELLEDinstead of 500 andSYSTEM_ERROR. It happens, for example, when the application shuts down while a request waits for a lock: the request itself was fine and can be retried, usually on another instance, and it no longer counts as a server error in 5xx-by-code alerts onSYSTEM_ERROR. An MCP tool reportsREQUEST_CANCELLEDtoo. To keep the old response, declare an@ExceptionHandler(CancellationException.class)in your own@RestControllerAdvicethat returns 500 withApiResponse.ofFail(CommonError.SYSTEM_ERROR)
Added
- Native images verified for the concurrency, Redis, cache and projection starters, and for listeners that run through Spring Modulith's JDBC publication registry: CI builds a second example,
ddk-example-inventory, against Redis and smoke-tests it. SUPPORT.md lists what is checked ddk-concurrency-starterregisters, ahead of time, the reflection that the key expressions of@AggregateLock,@Idempotentand@RateLimitneed on a native image: the parameter types of the annotated methods, as for JSON binding. Applications no longer register themddk.event.publications.sample.age, the seconds since the publication counts were last sampled, and the propertiesddk.event.metrics.publications.enabledandddk.event.metrics.publications.intervalCommonError.REQUEST_CANCELLED, answered with 503, and a503response in the error contract that the web starter adds to the API docsCommonArchRules.WIRING_CLASSES_ONLY_WIRE, an optional rule: a@Configurationclass outside the layers, which the layering rules exempt, may only declare@Beanmethods or override supertype methods, and may not call a mapper of the infrastructure layer. Projects generated from the archetypes check it; existing projects can add it to their architecture test. The existing rules are unchanged
Changed
ddk.event.publicationsis sampled in the background instead of being counted on every scrape. Spring Modulith'sevent_publicationtable has no index onstatus, so each count scans the table; every scrape used to run four of them on every instance. A sample now runs everyddk.event.metrics.publications.interval(1 minute by default), so the database load no longer follows the scrape rate, and a value can be up to one interval old. A failed sample keeps the previous values; after three failed samples in a row the gauges report NaN. Metric names and tags are unchangedddk-db-starteris no longer experimental. Its tests now run against PostgreSQL 17 and MySQL 8.4 as two data sources of one application: each source reaches its own database, the configured one is primary, and each transaction manager commits and rolls back only its own source. The 1.0 freeze covers it like the other starters
Deprecated
ddk-seata-starter. 1.0 removes it fromddk-dependenciesand stops publishing it: it has wiring tests only, Seata's runtime is not verified on Spring Boot 4, and global transactions go against the outbox and eventual consistency that DDK builds on. Its auto-configuration logs a warning at startup. To keep using it, pin 0.12.x or copy its three classes into your project
Fixed
- A native image that uses Spring Modulith's JDBC publication registry starts. The event starter wraps the event multicaster to check publications outside a transaction, and created that proxy class at runtime, which a native image cannot do; the class is now generated ahead of time
- The cache starter's local level works on a native image: it registers the Caffeine classes that its configuration builds, and the invalidation message it sends
- Projects generated from the archetypes compile Lombok annotations on JDK 23 and later. Since JDK 23, javac no longer runs annotation processors it finds on the classpath, so
@RequiredArgsConstructorand the like did nothing and compilation failed withvariable ... not initialized in the default constructor. The generatedpom.xmlnow lists Lombok under the compiler'sannotationProcessorPaths, and the archetype tests check it. In a project generated earlier, add the samemaven-compiler-pluginconfiguration (see the archetypepom.xml); list any other annotation processor you use there too, because only the listed ones run