반응형
매개변수
-
2.2.4 매개변수를 넘겨받는 방법Spring/웹 개발 101 2022. 4. 8. 01:17
@PathVariable 을 사용하면 됩니다. package com.example.demo.controller; import org.springframework.web.bind.annotation.PathVariable; import org.springframework.web.bind.annotation.GetMapping; import org.springframework.web.bind.annotation.RequestMapping; import org.springframework.web.bind.annotation.RestController; @RestController @RequestMapping("test") //resource public class TestController { @GetMapp..