sagecode 님의 블로그

  • 홈
  • 태그
  • 방명록

PathVariable 1

[Project] (4) API 구현(@RequestParam vs @PathVariable)

@GetMapping 사용법@GetMapping("/api/problem-set/{id}")public ResponseEntity getProblemSet(@PathVariable Long id) { ProblemSet problemSet = problemSetService.getProblemSet(id); // 서비스에서 문제지 조회 return ResponseEntity.ok(new ProblemSetResponse(problemSet));}동작 방식GET /api/problem-set/1 이런 요청이 들어오면{id}에 1이 들어감@PathVariable Long id가 1을 받음problemSetService.getProblemSet(1)이 실행됨@RequestParam과 차이점은?@Pa..

EduClass Project 2025.02.07
이전
1
다음
더보기
프로필사진

sagecode 님의 블로그

sagecode 님의 블로그 입니다.

  • 분류 전체보기 (110)
    • JAVA (20)
    • SPRING (9)
    • OS (3)
    • Network (4)
    • DATABASE (3)
    • 자료구조 (5)
    • Interview Question (41)
    • EduClass Project (8)
    • ShoppingMall Project (4)
    • 멋사 부트캠프 (12)
    • PLOT (1)

Tag

stack, Spring, Entity, bean, 다형성, heap, https, Gradle, sagecode, GoF, 자료구조, controller, HTTP, 디자인패턴, 스레드, 상속, springboot, JPA, Java, 의존성주입,

최근글과 인기글

  • 최근글
  • 인기글

최근댓글

공지사항

페이스북 트위터 플러그인

  • Facebook
  • Twitter

Archives

Calendar

«   2026/07   »
일 월 화 수 목 금 토
1 2 3 4
5 6 7 8 9 10 11
12 13 14 15 16 17 18
19 20 21 22 23 24 25
26 27 28 29 30 31

방문자수Total

  • Today :
  • Yesterday :

Copyright © AXZ Corp. All rights reserved.

티스토리툴바