목록2024/03/01 (1)
미소를뿌리는감자의 코딩
[Spring] HTTP 데이터를 객체로 바꾸는 법
1. html을 반환하는 방법 @GetMapping("/form/html") public String helloForm() { return "hello-request-form"; } 2. pass variable 방식 // [Request sample] // pass browser 방식 // GET http://localhost:8080/hello/request/star/Robbie/age/95 @GetMapping("/star/{name}/age/{age}") @ResponseBody public String helloRequestPath(@PathVariable String name, @PathVariable int age) { return String.format("Hello, @PathVariab..
강의수강/[Spring]
2024. 3. 1. 09:47