parent
b116fe9911
commit
1d100a25b6
|
@ -9,7 +9,7 @@ import java.io.BufferedReader;
|
||||||
import java.io.IOException;
|
import java.io.IOException;
|
||||||
import java.io.InputStream;
|
import java.io.InputStream;
|
||||||
import java.io.InputStreamReader;
|
import java.io.InputStreamReader;
|
||||||
import java.nio.charset.Charset;
|
import java.nio.charset.StandardCharsets;
|
||||||
import java.sql.Timestamp;
|
import java.sql.Timestamp;
|
||||||
import java.time.LocalDateTime;
|
import java.time.LocalDateTime;
|
||||||
import java.time.format.DateTimeFormatter;
|
import java.time.format.DateTimeFormatter;
|
||||||
|
@ -191,7 +191,7 @@ public class Helper {
|
||||||
public static String inputStream2String(InputStream inputStream) {
|
public static String inputStream2String(InputStream inputStream) {
|
||||||
StringBuilder sb = new StringBuilder();
|
StringBuilder sb = new StringBuilder();
|
||||||
|
|
||||||
try (BufferedReader reader = new BufferedReader(new InputStreamReader(inputStream, Charset.defaultCharset()))) {
|
try (BufferedReader reader = new BufferedReader(new InputStreamReader(inputStream, StandardCharsets.UTF_8))) {
|
||||||
String line;
|
String line;
|
||||||
while ((line = reader.readLine()) != null) {
|
while ((line = reader.readLine()) != null) {
|
||||||
sb.append(line);
|
sb.append(line);
|
||||||
|
|
|
@ -97,7 +97,7 @@ public class GlobalExceptionHandler {
|
||||||
"+++ Request: {}\n" +
|
"+++ Request: {}\n" +
|
||||||
"--- Verify params failed: {}",
|
"--- Verify params failed: {}",
|
||||||
reqType, reqPath, reqIp, reqToken, Helper.inputStream2String(req.getInputStream()),
|
reqType, reqPath, reqIp, reqToken, Helper.inputStream2String(req.getInputStream()),
|
||||||
ex.getMessage());
|
ex.getDescription() != null ? ex.getDescription() : ex.getMessage());
|
||||||
} catch (Exception ignored) {
|
} catch (Exception ignored) {
|
||||||
}
|
}
|
||||||
log.debug("SecurityProtocolException Exception: ", ex);
|
log.debug("SecurityProtocolException Exception: ", ex);
|
||||||
|
|
Loading…
Reference in New Issue