Files
java21-template/docker-compose.yml
Bruno GaoandQwen-Coder 95adc3b03c feat: implement batch 8 Redis caching and distributed locks
- Add BaseAuditPO with audit fields (createUserId, updateUserId, createTime, updateTime, deleted, version)
- Implement MapStruct for Order ↔ OrderPO mapping with @BeanMapping(ignoreByDefault=true)
- Create RedisCacheConfig with conditional loading (app.cache.enabled=true)
- Create RedisLockService with SET NX EX distributed locking
- Add Redis profile configuration (application-redis.yml)
- Update OrderAppService with @Cacheable/@CacheEvict annotations
- Create comprehensive integration tests for cache and lock functionality
- Update docker-compose.yml to include Redis service
- Update application-dev.yml to include redis profile
- Add proper error handling and tenant isolation for cache keys
- Follow M2 v5 frozen contracts for audit trail and persistence layer

Co-authored-by: Qwen-Coder <[email protected]>
2026-02-12 18:26:31 +08:00

31 lines
732 B
YAML

# ============================================================
# Docker Compose - Development Services
# ============================================================
# Usage:
# Start: docker compose up -d
# Stop: docker compose down
# View logs: docker compose logs -f
# ============================================================
services:
postgres:
image: postgres:15-alpine
environment:
POSTGRES_DB: tmpl_dev
POSTGRES_USER: postgres
POSTGRES_PASSWORD: postgres
ports:
- "5432:5432"
volumes:
- pgdata:/var/lib/postgresql/data
redis:
image: redis:7-alpine
ports:
- "6379:6379"
volumes:
- redisdata:/data
volumes:
pgdata:
redisdata: