jpablog : http test

This commit is contained in:
kim
2021-01-28 23:27:22 +09:00
parent 13c1d9d2db
commit 17a5be0425
2 changed files with 42 additions and 0 deletions

View File

@@ -0,0 +1,31 @@
package com.example.jpablog.test;
import org.springframework.http.ResponseEntity;
import org.springframework.web.bind.annotation.*;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
@RestController
public class HttpControllerTest {
@GetMapping("/http/get")
public String getTest(Member member) {
return "get 요청" + member.getId() + ", " + member.getUsername();
}
@PostMapping("/http/post")
public String postTest() {
return "post 요청";
}
@PutMapping("/http/put")
public String putTest() {
return "put 요청";
}
@DeleteMapping("http/delete")
public String deleteTest() {
return "delete 요청";
}
}

View File

@@ -0,0 +1,11 @@
package com.example.jpablog.test;
import lombok.Data;
@Data
public class Member {
private int id;
private String username;
private String password;
private String email;
}