From c28d281aff25cbb70e0ebae16e22ed0d2bdd5174 Mon Sep 17 00:00:00 2001 From: mjkhan21 Date: Fri, 12 Apr 2024 10:48:33 +0900 Subject: [PATCH] =?UTF-8?q?WebClient.data(Map)=20=EC=B6=94=EA=B0=80?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../xit/foundation/data/paging/MybatisPlugin.java | 2 +- src/main/java/cokr/xit/foundation/web/WebClient.java | 11 +++++++++++ 2 files changed, 12 insertions(+), 1 deletion(-) diff --git a/src/main/java/cokr/xit/foundation/data/paging/MybatisPlugin.java b/src/main/java/cokr/xit/foundation/data/paging/MybatisPlugin.java index 0a0ce3e..f731b0f 100644 --- a/src/main/java/cokr/xit/foundation/data/paging/MybatisPlugin.java +++ b/src/main/java/cokr/xit/foundation/data/paging/MybatisPlugin.java @@ -58,7 +58,7 @@ public class MybatisPlugin extends AbstractComponent implements Interceptor { Object[] args = invocation.getArgs(); String methodName = method.toString(); - log().debug(methodName); +// log().debug(methodName); if (methodName.contains("Executor.query")) return query((Executor)target, (MappedStatement)args[0], args[1], (RowBounds)args[2], (ResultHandler)args[3]); diff --git a/src/main/java/cokr/xit/foundation/web/WebClient.java b/src/main/java/cokr/xit/foundation/web/WebClient.java index 21b33fe..82d71d2 100644 --- a/src/main/java/cokr/xit/foundation/web/WebClient.java +++ b/src/main/java/cokr/xit/foundation/web/WebClient.java @@ -422,6 +422,17 @@ public class WebClient { return this; } + /**요청으로 전달할 데이터를 설정한다. + * @param map 요청으로 전달할 데이터를 갖는 맵. 맵의 키는 파라미터 이름으로 쓰인다. + * @return 현재 Request + */ + public Request data(Map map) { + if (map != null) { + map.forEach(this::data); + } + return this; + } + /**요청으로 전달할 데이터를 설정한다. * @param data 데이터 값 * @return 현재 Request