From 014789ea5c6291dab89730dcd6d1043dfac43dc3 Mon Sep 17 00:00:00 2001 From: YB08049 Date: Mon, 21 Jun 2021 14:31:37 +0900 Subject: [PATCH] To decode in UTF-8 --- .../advice/JsonValidationRequestBodyControllerAdvice.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/main/java/com/github/JanLoebel/jsonschemavalidation/advice/JsonValidationRequestBodyControllerAdvice.java b/src/main/java/com/github/JanLoebel/jsonschemavalidation/advice/JsonValidationRequestBodyControllerAdvice.java index 31f09c5..747f7e9 100644 --- a/src/main/java/com/github/JanLoebel/jsonschemavalidation/advice/JsonValidationRequestBodyControllerAdvice.java +++ b/src/main/java/com/github/JanLoebel/jsonschemavalidation/advice/JsonValidationRequestBodyControllerAdvice.java @@ -85,7 +85,7 @@ private String toString(HttpInputMessage inputMessage) throws IOException { } private InputStream fromString(String body) { - return new ByteArrayInputStream(body.getBytes()); + return new ByteArrayInputStream(body.getBytes(StandardCharsets.UTF_8)); } private HttpInputMessage buildHttpInputMessage(String body, HttpHeaders httpHeaders) {