Framework & Library/Spring Boot
Spring Boot - DELETE API
임빈영
2022. 2. 1. 18:37
DELETE API
@DeleteMapping
@DeleteMapping(value = "/delete/{variable}")
public String DeleteVariable(@PathVariable String variable) {
return variable;
}
- DELETE API를 제작하기 위해 사용되는 애너테이션이다.
- 서버를 통해 리소스를 삭제하기 위해 사용되는 방식이다.
- 일반적으로 "@PathVariable" 애너테이션을 통해 리소스 id 등을 받아 처리한다.
- 컨트롤러와 매핑된 URL에 변수를 포함하여 요청을 하였고, 그에 대한 응답을 서버로부터 받는 것을 확인할 수 있다.
GitHub - qlsdud0604/spring-boot-study
Contribute to qlsdud0604/spring-boot-study development by creating an account on GitHub.
github.com
728x90