Skip to content

v0.1.0

Choose a tag to compare

@github-actions github-actions released this 17 Sep 16:00
· 106 commits to main since this release

The first release: the DDD foundation on a Spring Boot 4.1 baseline.

Added

  • Domain model primitives in com.ddk.core.domain: Identifier, ValueObject, Entity, AggregateRoot, DomainEvent, DomainEventPublisher, Specification, with a framework-free domain package enforced by tests
  • GenericRepository backed by MyBatis-Plus, with Entity ↔ PO mappers that fail at startup when missing or duplicated, and optimistic locking through AggregateRoot.version()
  • Starters under a unified ddk.* namespace: web, MyBatis, domain events, Redis, two-level cache, named data sources, tracing, Seata and ArchGuard
  • ddk-cache-starter: Caffeine (L1) + Redis (L2) with cross-instance invalidation, Redis failure fallback, TTL jitter and Micrometer metrics
  • ddk-redis-starter: a JSON RedisTemplate whose deserialization only accepts allow-listed packages
  • ddk-archguard-starter: three- and four-layer ArchUnit rules, domain purity rules, and DDK_INTERNALS_MUST_NOT_BE_USED
  • Three- and four-layer Maven archetypes, and the runnable ddk-example-user application
  • scripts/ddk.sh to install DDK locally and generate projects in one command
  • Null-safety: every package in ddk-core, ddk-mybatis and the starters is @NullMarked with JSpecify, and NullAway checks it at compile time
  • Javadoc and sources jars for every module, built by the release profile in CI and attached to GitHub Releases; internal packages are left out of the Javadoc
  • Quality gates in mvn verify: Spotless checks and per-module JaCoCo minimums (70% lines, 50% branches); CI on Java 21 and 25

Changed

  • Baseline is Spring Boot 4.1, Spring Framework 7 and Jackson 3
  • ddk-web-starter contributes Jackson defaults through JsonMapperBuilderCustomizer and serializes Long as a string
  • ddk-tracer-starter builds on spring-boot-starter-opentelemetry instead of the whole actuator
  • Entity.id(), AggregateRoot.version() and ApiResponse data are declared @Nullable; AbstractException.getArgs() returns an empty array instead of null
  • The Redis level of the two-level cache writes synchronously, because Spring Data Redis 4 writes asynchronously by default and that let stale values flow back into L1

Removed

  • RedisUtil; inject RedisTemplate<String, Object> directly

Internal

Starter implementation classes live in com.ddk.<starter>.starter.internal packages and are not public API: CacheInvalidationListener, CacheInvalidationMessage, RedisCacheInvalidationPublisher, MicrometerCacheMetrics, JitteredTtlFunction, SpringDomainEventPublisher and TraceIdResponseFilter. Generated projects check this with DDK_INTERNALS_MUST_NOT_BE_USED.

  • The springdoc dependency from ddk-web-starter; add it in the application when API docs are needed