package org.example.restapi.restapi.controller;
import lombok.extern.slf4j.Slf4j;
import org.example.restapi.restapi.controller.model.UserInfo;
import org.springframework.web.bind.annotation.*;
@Slf4j
@RestController
@RequestMapping("/api")
public class PutApiController {
//중괄호를 통해 여러 주소를 매핑해줄 수 있다
@DeleteMapping(path = {"/user/{userName}/delete",
"/user/{userName}/del"
})
public void delete(
@PathVariable String userName
){
log.info("user-name: {}",userName);
}
}
간단하게 하나의 파일로만 보자면 이렇다.