You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
멱등키(Idempotency-Key) 처리 로직 개선 - 검증 순서, null 처리, 원자성 보강 #351
StringidempotentKey = httpServletRequest.getHeader("Idempotency-Key");
if (idempotentKey == null || idempotentKey.trim().isEmpty()) {
thrownewInvalidIdempotencyKeyException(); // 또는 적절한 처리
}
3. 원자적 연산으로 변경
Option A: Redis setIfAbsent() 사용
Booleansuccess = redisTemplate.opsForValue()
.setIfAbsent(key, value, duration);
if (!success) {
// 이미 존재하는 경우returnredisTemplate.opsForValue().get(key);
}
Activity