package com.example.delete.controller;
import org.springframework.web.bind.annotation.*;
@RestController
@RequestMapping("/api")
public class DeleteApiController {
    @DeleteMapping("/delete/{userId}")
    public void delete(@PathVariable String userId, @RequestParam String account) {
        System.out.println(userId);
        System.out.println(account);
    }
}
이렇게 API를 요청하고..
100
user100
delete는 request가 다르지만 않으면 삭제가 됐거나 데이터가 없어도 200ok다.delete는 get이랑 동일하다. 대신 delete가 하는 동작 자체가 리소스를 삭제하는 것이기 때문에 리소스가 없다 라는 값을 던질 필요가 없다.