From 2cc9a451d7f19831b298bd3edb6e07b2426c3ec4 Mon Sep 17 00:00:00 2001 From: jeonghoon Date: Tue, 26 Sep 2023 10:37:36 +0900 Subject: [PATCH] =?UTF-8?q?refactor:=20ObjectMapper=EB=A5=BC=20JsonView=20?= =?UTF-8?q?=ED=95=84=EB=93=9C=EB=A1=9C=20=EB=91=90=EA=B8=B0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../webmvc/org/springframework/web/servlet/view/JsonView.java | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/mvc/src/main/java/webmvc/org/springframework/web/servlet/view/JsonView.java b/mvc/src/main/java/webmvc/org/springframework/web/servlet/view/JsonView.java index 796c2c3940..dcada7d812 100644 --- a/mvc/src/main/java/webmvc/org/springframework/web/servlet/view/JsonView.java +++ b/mvc/src/main/java/webmvc/org/springframework/web/servlet/view/JsonView.java @@ -9,9 +9,10 @@ public class JsonView implements View { + private final ObjectMapper objectMapper = new ObjectMapper(); + @Override public void render(final Map model, final HttpServletRequest request, HttpServletResponse response) throws Exception { - final ObjectMapper objectMapper = new ObjectMapper(); final Object modelValue = getModelValue(model); response.setContentType(MediaType.APPLICATION_JSON_UTF8_VALUE);