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

[4기 박이슬] URL Shortener 과제 제출합니다. #39

Open
wants to merge 22 commits into
base: Yiseull
Choose a base branch
from

Conversation

Yiseull
Copy link
Member

@Yiseull Yiseull commented Oct 3, 2023

📌 과제 설명

  • URL Shortener 사이트를 참고하여 URL Shortener를 구현하였습니다.

👩‍💻 요구 사항과 구현 내용

  • URL 입력폼 제공 및 결과 출력
  • URL Shortening Key는 8 Character 이내로 생성
  • 단축된 URL 요청시 원래 URL로 리다이렉트
  • 단축된 URL에 대한 요청 수 정보저장 (optional)

🔑 URL Shortening Key 생성

  • Shortening Key를 7글자 내로 생성하기 위해, 자동 증가되는 Id값을 가지고 Base62로 인코딩 하였습니다.

🎥 입력폼, 결과 출력

스크린샷 2023-10-03 오후 11 34 13 스크린샷 2023-10-03 오후 11 34 20 스크린샷 2023-10-03 오후 11 34 32 스크린샷 2023-10-03 오후 11 34 42

✅ PR 포인트 & 궁금한 점

  • Thymeleaf를 사용하기 위해 @controller를 사용하여 작성했는데, 평소 개발할 때 @controller는 잘 쓰지 않으니까 @RestController를 사용하는 방식으로 변경하는 중입니다! 변경하는 과정에서 어려움이 있는데 어떻게 해결해야 할지 잘 모르겠습니다🥲
    다음은 문제 상황입니다. 단축하고 싶은 URL을 입력하고 버튼을 누릅니다. 그러고 컨트롤러에서 단축 URL을 생성 후, 단축 URL 출력하는 페이지로 이동해야 하는데 이때 Redirect 시키면 단축된 URL이 담긴 body값이 사라지게 됩니다. 이런 경우는 어떻게 처리해야 할까요??

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

1 participant