package com.example.mvc.controller.get import com.example.mvc.model.http.UserRequest import org.springframework.web.bind.annotation.* @RestController //REST API @RequestMapping("/api") //localhost:8080/api class GetApiController { //Get 주소를 노출할때 사용 하는 방법 : 최근 //@GetMapping("/hello") : http://localhost:8080/api/hello @GetMapping(path = ["/hello", "/abcd"]) //Get http://localhost:8080/api/hello, G..
API 작성 목적 : 모바일 어플리케이션, 웹 등에서 사용되는 API 제작 IDE : IntelliJ 1. Spring Initializer 로 프로젝트 생성 2. 파일 구성 Controller Api 컨트롤러 Model 데이터 필드 정보 코드 UserProfile package com.example.demo.model; public class UserProfile { private String id; private String name; private String phone; private String address; public UserProfile(String id, String name, String phone, String address) { this.id = id; this.name = nam..