Repository navigation
v1.0.0-RC1
Pre-releaseThe first release candidate of 1.0. From 1.0 on, the contract in COMPATIBILITY.md holds: breaking changes only in a major release, checked by the API check against the last release and by the compatibility fixtures of every release since 0.10.0. Before the freeze, four things change that could not change afterwards: ddk-seata-starter is removed, ObjectMapper is renamed to BeanMapper, EnumMapper rejects an unknown value instead of returning null, and Operator becomes a final class with the same API. The MCP and tracer starters and the projection SPI are previews in 1.0 and may still change in a 1.x minor release. This candidate includes the security fixes of 0.12.1. It stays a candidate for at least four weeks, until two or three projects outside this repository have tried it; the upgrade guide lists the steps from 0.12, and reports go to the issue tracker.
Breaking
ddk-seata-starteris removed: it is no longer built or published, andddk-dependenciesno longer manages it or Seata. It was deprecated in 0.12.0; it had wiring tests only, Seata's runtime was never verified on Spring Boot 4, and global transactions go against the outbox and eventual consistency that DDK builds on. To keep using it, stay onddk-seata-starter0.12.0 and declare its version yourself, or copy its three classes (DdkSeataAutoConfiguration,DdkSeataProperties,XidPropagationInterceptor) into your project together withseata-spring-boot-starterEnumMapper.toEnumthrowsIllegalArgumentExceptionfor a value that no constant of the enum has, naming the value, its type and the enum, instead of returningnull. Anullvalue still maps tonull. Before, an aggregate loaded from a row with an unknown value gotnullin that field and failed somewhere else, or not at all. For a rolling upgrade this means: deploy the version that knows a new enum constant to every instance before anything writes its value. Values are compared withequals, so anINTcolumn read asIntegerdoes not match agetValue()that returnsLong; that also fails nowcom.ddk.core.mapper.ObjectMapperis renamed toBeanMapper, so that it no longer shares its name with Jackson'sObjectMapper; a class that used both had to spell one of them out in full. The methods are unchanged. Replace the import and the type name in your converters:implements ObjectMapper<Order, OrderPO>becomesimplements BeanMapper<Order, OrderPO>.MapperProvider.lookupandGenericRepositoryImpl.toPo()andtoEntity()returnBeanMappernowOperatoris a final class instead of a record, so that 1.x can give it new properties, for example who acts on behalf of whom, without a breaking change: a record's canonical constructor and its deconstruction pattern are API, and one more component would break both. The constructorOperator(id, name, tenantId),of(...),id(),name(),tenantId(),equals,hashCodeandtoStringstay as they were, so code that only creates and reads operators needs only a recompile. Code that deconstructs one,if (o instanceof Operator(var id, var name, var tenantId)), reads the accessors instead
Added
ddk.event.consume.failures{group}: how many times the longest failing RocketMQ queue of a consumer group has failed in a row. With orderly consumption, the default, a message that always fails holds up its queue without limit; the gauge keeps growing in that case, and from the tenth failure in a row the log entry is an error instead of a warning. The event starter's README lists the cases that fail every time
Changed
ddk-mybatis-starterlogs a warning at startup whenddk.mybatis.worker-idandddk.mybatis.datacenter-idare not both set. The derived snowflake identity comes from the MAC address and the process ID; in containers, where the process ID is usually 1, only 32 identities remain, and two of seven instances collide with a probability of about one half, which shows as a rare duplicate key on insert- DDK is built against the patch releases Spring Boot 4.1.2, Spring AI 2.0.2, MyBatis-Plus 3.5.18.1, Hutool 5.8.48 and Lombok 1.18.48, and
ddk-dependenciesmanages Spring Modulith 2.1.2, springdoc 3.2.0 and okio 3.18.2. Spring Modulith 2.1.2 marks a publication as failed or resubmitted only while it is not completed, so a completed publication can no longer be resubmitted by mistake; publications that really failed are resubmitted as before
Fixed
- The cache starter's README states two limits it did not mention: an eviction that fails while Redis is unreachable leaves the old value in Redis until the L2 TTL ends it, so the L1 TTL bounds staleness only when the eviction reached Redis; and cache keys do not include the tenant, so with multi-tenancy the key has to carry it
- With
ddk.web.cors.allow-credentials=true, startup now also fails for origin patterns whose host is only wildcards, such ashttps://*,*://*orhttps://*:8080. Only the literal*was rejected before, although the origins are applied as patterns, so these let any site call the API with the user's credentials. Patterns that fix the domain, such ashttps://*.example.com, still work - The error contract in the API docs includes
429withRATE_LIMITED, which@RateLimitanswers with - The cache's level 2 no longer falls back to JDK serialization when the Redis starter's allow-listed serializer is missing, for example because the application excluded the Redis starter's auto-configuration. It used to, silently: anyone who could write to Redis could then make the application instantiate any class, and the values were binary instead of JSON. It now builds the same allow-listed JSON serializer, trusting the application's packages, and logs a warning
- The Javadoc of
DomainEventPublisherand the event starter's README said that every subscriber must use@TransactionalEventListener(AFTER_COMMIT). Since the outbox, events are published after the write and before the commit, and the generatedAGENTS.mdalready told the other half: work that must commit with the business, such as translating to an integration event, uses@EventListener. Both now give the two cases - The concurrency starter's README states that the keys of
@Idempotent,@RateLimitand@AggregateLockdo not include the tenant, and shows how to add it