728x90 requestParam1 java - GET API API 컨트롤러 시작하기 @RestController @RequestMapping("/api/get") public class GetApiController { ... } 컨트롤러 클래스위에 어노테이션 @RestController와 @RequestMapping를 붙여줍니다. @RestController은 컨트롤러로 쓰겠다고 선언하것이고 @RequestMapping 클라이언트에서 보낼 URI를 기술하면 됩니다. @RequestMapping vs @GetMapping @RestController @RequestMapping("/api/get") public class GetApiController { @GetMapping(path = "/hello") // http://localhost:9090/api/ge.. 2021. 8. 26. 이전 1 다음 728x90