almondiz / almondiz-server

0 stars 1 forks source link

[FEAT] Exception ControllerAdvice 생성 #7

Closed yejipractice closed 2 years ago

yejipractice commented 2 years ago

μ„€λͺ… πŸ““

μ΄μŠˆμ— λŒ€ν•œ μ„€λͺ…을 μž‘μ„±ν•©λ‹ˆλ‹€. λ‹΄λ‹Ήμžλ„ ν•¨κ»˜ μž‘μ„±ν•˜λ©΄ μ’‹μŠ΅λ‹ˆλ‹€. μ˜ˆμ™Έ 처리 메세지λ₯Ό λ”°λ‘œ λͺ¨μ•„ μ„€μ •ν•  수 μžˆλ„λ‘ Exception ControllerAdvice 생성

체크사항 β˜‘οΈ

이슈λ₯Ό closeν•˜κΈ° μœ„ν•΄ ν•„μš”ν•œ 쑰건듀을 μ²΄ν¬λ°•μŠ€λ‘œ λ‚˜μ—΄ν•©λ‹ˆλ‹€.

  • [x] Exception ControllerAdvice 생성
  • [x] 응닡 JSON μ„€μ • μœ„ν•œ Response Class 및 Service 생성

참고자료 ⁉️

이슈λ₯Ό ν•΄κ²°ν•˜κΈ° μœ„ν•΄ ν•„μš”ν•œ μ°Έκ³ μžλ£Œκ°€ μžˆλ‹€λ©΄ μΆ”κ°€ν•©λ‹ˆλ‹€. https://daddyprogrammer.org/post/446/spring-boot2-5-exception-handling-controlleradvice/

κ΄€λ ¨ λ…Όμ˜ πŸ§‘β€πŸ€β€πŸ§‘

μ΄μŠˆμ— λŒ€ν•œ λ…Όμ˜κ°€ μžˆμ—ˆλ‹€λ©΄ λ…Όμ˜ λ‚΄μš©μ„ κ°„λž΅ν•˜κ²Œ μΆ”κ°€ν•©λ‹ˆλ‹€. ν‹€λ§Œ μƒμ„±ν•˜κ³  이후 custom μ˜ˆμ™Έ μΆ”κ°€