From d71663e0d665bad78fbc36c9df89bb23ce824b83 Mon Sep 17 00:00:00 2001 From: daniel LEE Date: Thu, 2 Nov 2023 09:58:36 +0900 Subject: [PATCH] =?UTF-8?q?=EC=A0=84=EC=86=A1=20=ED=83=80=EC=9E=85=20?= =?UTF-8?q?=EB=B3=80=EA=B2=BD?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../controller/UserProfileController.java | 4 +- src/main/webapp/WEB-INF/views/add.jsp | 45 +++++++++++++++---- 2 files changed, 38 insertions(+), 11 deletions(-) diff --git a/src/main/java/com/example/demo/controller/UserProfileController.java b/src/main/java/com/example/demo/controller/UserProfileController.java index 3d7e0dd..4dcb526 100644 --- a/src/main/java/com/example/demo/controller/UserProfileController.java +++ b/src/main/java/com/example/demo/controller/UserProfileController.java @@ -45,7 +45,7 @@ public class UserProfileController { @Value("server.servlet.context-path") private String CONTEXT_PATH; - @PutMapping("/user/{id}") + @PostMapping("/user/{id}") // public HashMap putUserProfile(@PathVariable String id, @RequestParam String name, // public void putUserProfile(@PathVariable String id, @RequestParam String name, public List putUserProfile(@PathVariable String id, @RequestParam String name, @@ -121,7 +121,7 @@ public class UserProfileController { // return map; //스프링이 자동으로 JSON타입으로 반환해서 전달한다. } - @PostMapping("/user/{id}") + @PutMapping("/user/{id}") public void postUserProfile(@PathVariable String id, @RequestParam String name, @RequestParam String phone, @RequestParam String address, @RequestParam String filepath) { mapper.updateUserProfile(id, name, phone, address, filepath); diff --git a/src/main/webapp/WEB-INF/views/add.jsp b/src/main/webapp/WEB-INF/views/add.jsp index 24d50eb..f71be4e 100644 --- a/src/main/webapp/WEB-INF/views/add.jsp +++ b/src/main/webapp/WEB-INF/views/add.jsp @@ -6,24 +6,51 @@ Insert title here + + + + + - aaaaaaa +



-
+ - - - - - - - + + + +
ID
ID