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 님의 블로그 입니다.

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

Tag

java문법, sagecode, JPA, 다형성, Java, HTTP, 자료구조, GoF, 의존성주입, 팩토리메소드패턴, JVM, 디자인패턴, springboot, Gradle, Entity, controller, springproject, Spring, 상속, stack,

최근글과 인기글

  • 최근글
  • 인기글

최근댓글

공지사항

페이스북 트위터 플러그인

  • Facebook
  • Twitter

Archives

Calendar

«   2025/08   »
일 월 화 수 목 금 토
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 © Kakao Corp. All rights reserved.

티스토리툴바