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
# 실행
./gradlew :point-api:bootRun
# jar 생성 및 실행
./gradlew clean :point-api:buildNeeded --stacktrace --info --refresh-dependencies -x test -x asciidoctor
java -jar ./point-api/build/libs/point-api-*.jar
멀티 모듈로 구성하여 레이어 간 의존성을 분리. ex) batch 모듈을 추가한다면 domain, infra 모듈을 재활용 가능할 것이라 기대.
Redis를 활용하여 회원별 포인트 조회 시 서버 부하 최소화 RDBMS와 Redis의 데이터를 동기화하기 위해 @TransactionListener를 활용하여 Commit이 일어났을 경우에만 Redis에 증감내용을 갱신. Redis에 잔여
포인트를 덮어쓰는 것이 아니라 증감내용만 갱신하기 때문에 RDBMS와 불일치 요소를 줄임.
# 포인트 300 증가
redis> incrby user:1:point:remain 300
# 포인트 5000 감소
redis> incrby user:1:point:remain -5000
포인트 적립, 사용, 사용취소 요청을 받을때 식별자를 넘겨받아 중복으로 처리되지 않도록함.