|
|
@ -12,12 +12,12 @@ import java.util.HashMap;
|
|
|
|
import java.util.Iterator;
|
|
|
|
import java.util.Iterator;
|
|
|
|
import java.util.Map;
|
|
|
|
import java.util.Map;
|
|
|
|
import java.util.stream.Collectors;
|
|
|
|
import java.util.stream.Collectors;
|
|
|
|
|
|
|
|
|
|
|
|
import javax.servlet.ReadListener;
|
|
|
|
import javax.servlet.ReadListener;
|
|
|
|
import javax.servlet.ServletInputStream;
|
|
|
|
import javax.servlet.ServletInputStream;
|
|
|
|
import javax.servlet.http.HttpServletRequest;
|
|
|
|
import javax.servlet.http.HttpServletRequest;
|
|
|
|
import javax.servlet.http.HttpServletRequestWrapper;
|
|
|
|
import javax.servlet.http.HttpServletRequestWrapper;
|
|
|
|
|
|
|
|
import kr.xit.core.support.utils.Checks;
|
|
|
|
|
|
|
|
import lombok.extern.slf4j.Slf4j;
|
|
|
|
import org.apache.commons.io.IOUtils;
|
|
|
|
import org.apache.commons.io.IOUtils;
|
|
|
|
import org.apache.commons.lang3.StringUtils;
|
|
|
|
import org.apache.commons.lang3.StringUtils;
|
|
|
|
import org.json.simple.JSONArray;
|
|
|
|
import org.json.simple.JSONArray;
|
|
|
@ -25,10 +25,6 @@ import org.json.simple.JSONObject;
|
|
|
|
import org.json.simple.parser.JSONParser;
|
|
|
|
import org.json.simple.parser.JSONParser;
|
|
|
|
import org.json.simple.parser.ParseException;
|
|
|
|
import org.json.simple.parser.ParseException;
|
|
|
|
import org.springframework.http.MediaType;
|
|
|
|
import org.springframework.http.MediaType;
|
|
|
|
import org.springframework.web.filter.OncePerRequestFilter;
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
import kr.xit.core.support.utils.JsonUtils;
|
|
|
|
|
|
|
|
import lombok.extern.slf4j.Slf4j;
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
/**
|
|
|
|
* <pre>
|
|
|
|
* <pre>
|
|
|
@ -98,7 +94,11 @@ public class ReadableRequestWrapper extends HttpServletRequestWrapper {
|
|
|
|
Iterator iterator = jsonObject.keySet().iterator();
|
|
|
|
Iterator iterator = jsonObject.keySet().iterator();
|
|
|
|
while (iterator.hasNext()) {
|
|
|
|
while (iterator.hasNext()) {
|
|
|
|
String key = (String)iterator.next();
|
|
|
|
String key = (String)iterator.next();
|
|
|
|
|
|
|
|
if(Checks.isNotEmpty(jsonObject.get(key))) {
|
|
|
|
setParameter(key, jsonObject.get(key).toString().replace("\"", "\\\""));
|
|
|
|
setParameter(key, jsonObject.get(key).toString().replace("\"", "\\\""));
|
|
|
|
|
|
|
|
}else{
|
|
|
|
|
|
|
|
setParameter(key, jsonObject.get(key) == null? null:StringUtils.EMPTY);
|
|
|
|
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|