Closed yejipractice closed 2 years ago
μ΄μμ λν μ€λͺ μ μμ±ν©λλ€. λ΄λΉμλ ν¨κ» μμ±νλ©΄ μ’μ΅λλ€. μμΈ μ²λ¦¬ λ©μΈμ§λ₯Ό λ°λ‘ λͺ¨μ μ€μ ν μ μλλ‘ Exception ControllerAdvice μμ±
μ΄μλ₯Ό closeνκΈ° μν΄ νμν 쑰건λ€μ 체ν¬λ°μ€λ‘ λμ΄ν©λλ€. [x] Exception ControllerAdvice μμ± [x] μλ΅ JSON μ€μ μν Response Class λ° Service μμ±
μ΄μλ₯Ό closeνκΈ° μν΄ νμν 쑰건λ€μ 체ν¬λ°μ€λ‘ λμ΄ν©λλ€.
μ΄μλ₯Ό ν΄κ²°νκΈ° μν΄ νμν μ°Έκ³ μλ£κ° μλ€λ©΄ μΆκ°ν©λλ€. https://daddyprogrammer.org/post/446/spring-boot2-5-exception-handling-controlleradvice/
μ΄μμ λν λ Όμκ° μμλ€λ©΄ λ Όμ λ΄μ©μ κ°λ΅νκ² μΆκ°ν©λλ€. νλ§ μμ±νκ³ μ΄ν custom μμΈ μΆκ°
μ€λͺ π
체ν¬μ¬ν βοΈ
μ°Έκ³ μλ£ βοΈ
κ΄λ ¨ λ Όμ π§βπ€βπ§