Kotlin syntax & coding constraints for the backend service: treat Kotlin as Java
syntax sugar, not as a new paradigm. Bans !! / lateinit / coroutines / RxJava /
Reactor, data-class entities, and XxxUtils|Util|Helper|Common classes — each rule
states the concrete failure it prevents.
Also records the Gradle two-sided version constraint in 01-project-structure.md:
the Boot 4.1 plugin needs 8.14+ or 9.x while KGP 2.4.10 tops out at 9.5.0, so
bumping either side means recomputing the intersection.
Skeleton follows the existing convention (## 决策 first, then 使用规则, topic
sections, ending with a 为什么不选另一个方案 comparison table).
Co-Authored-By: Claude Code <noreply@anthropic.com>
- Introduced a new section on cross-domain collaboration and aggregation, detailing decision-making processes, contract module usage for cross-domain reads, and domain events for writes.
- Added guidelines for parallel aggregation using a dedicated thread pool and context propagation.
- Established rules for transaction boundaries, idempotency, optimistic locking, scheduled tasks, and caching strategies in a concurrent environment.
- Included examples and best practices for implementing these concepts in the application.
- Introduced integration layer design with Resilience4j for external vendor calls.
- Established API design standards with unified response structures and global exception handling.
- Defined configuration and service governance using Kubernetes native solutions.
- Implemented observability practices including trace ID propagation and structured logging.
- Outlined build and multi-environment deployment strategies using Gradle and GitLab CI/CD.
- Specified testing strategies across different layers, utilizing JUnit, MockK, Testcontainers, and WireMock.