Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: 상품의 조회수 기능 및 치팅 방지 기능 구현 #29

Merged
merged 6 commits into from Jan 26, 2024

Conversation

sosow0212
Copy link
Owner

@sosow0212 sosow0212 commented Jan 24, 2024

📄 Summary

상품의 조회수 기능을 구현했습니다.

  • 상품 조회수 기능 추가
  • 조회수 치팅 방지를 위해서 쿠키 사용 (Redis를 이용해도 될 것 같습니다)
  • HandlerMethodArgumentResolver를 이용하여 @ViewCountChecker 어노테이션이 붙은 메서드에서 파라미터로 Boolean canAddViewCount로 바인딩 (이 값으로 조회수 증가 여부 판단)
    • 상품 쿠키 값에서 게시글 번호가 포함되어 있다면 false, 그 외에는 true, 24시간 만료시간 설정

🙋🏻 More

https://blog.naver.com/sosow0212/223332590048

close #25

@sosow0212 sosow0212 added the 기능 추가 기능을 추가합니다 label Jan 24, 2024
@sosow0212 sosow0212 self-assigned this Jan 24, 2024
@sosow0212 sosow0212 merged commit e5d2ed1 into develop Jan 26, 2024
1 check passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
기능 추가 기능을 추가합니다
Projects
None yet
Development

Successfully merging this pull request may close these issues.

상품의 조회수 기능 구현과 조회수 치팅 방지를 한다
1 participant