메모장

  • 홈
  • 태그
  • 방명록

Exception 1

Spring boot 예외 처리: @ControllerAdvice, @ExceptionHandler, ResponseStatusException

기존에 controller에서 예외 catch해서 직접 처리하는 방식을 자주 사용했었다.@GetMapping("/user/{id}")public ResponseEntity getUser(@PathVariable Long id) { try { User user = userService.findById(id); return ResponseEntity.ok(new ApiResponse("SUCCESS", "조회 성공", user)); } catch (UserNotFoundException e) { return ResponseEntity.status(HttpStatus.NOT_FOUND) .body(new ApiResponse("FAIL..

Backend/spring (Boot) 2025.07.26
이전
1
다음
더보기
프로필사진

  • 분류 전체보기 (295)
    • Frontend (107)
      • javaScript (31)
      • react (30)
      • vue3 (25)
      • angularjs (2)
      • jquery (4)
      • html (4)
      • css (3)
      • HTTP 통신 (8)
    • gridLib (24)
      • auiGrid (2)
      • agGrid (7)
      • jqGrid (15)
    • Backend (66)
      • JAVA (25)
      • spring (Boot) (26)
      • spring cloud (MSA) (10)
      • tomcat (2)
      • API (3)
    • SQL (2)
      • RDBMS (16)
      • NoSQL (4)
    • python (1)
    • study (42)
      • 클라우드&쿠버네티스 (7)
      • 보안 (6)
      • 알고리즘 문제 풀이 (28)
      • 네트워크 (1)
    • tool (4)
      • git (5)
    • error (13)

Tag

error, jqgrid, dfs bfs, vue emit, softeer, mapper, JWT, dfs, KINX, JavaScript, Python, 2024 데브크루, 백준, mybatis, 프로그래머스 dfs bfs, 프로그래머스, MSA, Spring Security, BFS, 프로그래머스 정렬,

최근글과 인기글

  • 최근글
  • 인기글

최근댓글

Copyright © Kakao Corp. All rights reserved.

티스토리툴바