serviceKey, response 로그 추가
This commit is contained in:
@@ -63,6 +63,12 @@ public class ApiController {
|
|||||||
|
|
||||||
String url = request.getServletPath();
|
String url = request.getServletPath();
|
||||||
String serviceValue = assignServiceValue(httpEntity, request, url);
|
String serviceValue = assignServiceValue(httpEntity, request, url);
|
||||||
|
if (StringUtils.isNotBlank(serviceValue)) {
|
||||||
|
logger.info("--------------------------------------------------");
|
||||||
|
logger.info("serviceCode={}", serviceValue);
|
||||||
|
logger.info("==================================================");
|
||||||
|
logger.info("==================================================");
|
||||||
|
}
|
||||||
ApiInfo api = apiService.findByUrlAndServiceValue(url, serviceValue);
|
ApiInfo api = apiService.findByUrlAndServiceValue(url, serviceValue);
|
||||||
if (api == null) {
|
if (api == null) {
|
||||||
throw new ResponseStatusException(HttpStatus.NOT_FOUND,
|
throw new ResponseStatusException(HttpStatus.NOT_FOUND,
|
||||||
@@ -109,8 +115,11 @@ public class ApiController {
|
|||||||
responseStatusCode = api.getResponseStatusCode().intValue();
|
responseStatusCode = api.getResponseStatusCode().intValue();
|
||||||
logger.info("Response Status Code={}", responseStatusCode);
|
logger.info("Response Status Code={}", responseStatusCode);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
String responseStr = assignResponseBody(api);
|
||||||
|
logger.info("ResponseBody={}", responseStr);
|
||||||
|
|
||||||
return new ResponseEntity<String>(assignResponseBody(api), responseHeaders, responseStatusCode);
|
return new ResponseEntity<String>(responseStr, responseHeaders, responseStatusCode);
|
||||||
}
|
}
|
||||||
|
|
||||||
private String assignServiceValue(HttpEntity<String> httpEntity, HttpServletRequest request, String url) {
|
private String assignServiceValue(HttpEntity<String> httpEntity, HttpServletRequest request, String url) {
|
||||||
@@ -155,10 +164,6 @@ public class ApiController {
|
|||||||
int startIdx = NumberUtils.toInt(args[0]);
|
int startIdx = NumberUtils.toInt(args[0]);
|
||||||
int length = NumberUtils.toInt(args[1]);
|
int length = NumberUtils.toInt(args[1]);
|
||||||
String serviceValue = msg.substring(startIdx, startIdx + length);
|
String serviceValue = msg.substring(startIdx, startIdx + length);
|
||||||
logger.info("--------------------------------------------------");
|
|
||||||
logger.info("serviceCode={}", serviceValue);
|
|
||||||
logger.info("==================================================");
|
|
||||||
logger.info("==================================================");
|
|
||||||
if (StringUtils.isBlank(serviceValue)) {
|
if (StringUtils.isBlank(serviceValue)) {
|
||||||
throw new ResponseStatusException(HttpStatus.NOT_FOUND,
|
throw new ResponseStatusException(HttpStatus.NOT_FOUND,
|
||||||
String.format("sbi-std-servlet not found(URL=%s, ServiceKey=%s)", url, serviceKey));
|
String.format("sbi-std-servlet not found(URL=%s, ServiceKey=%s)", url, serviceKey));
|
||||||
|
|||||||
Reference in New Issue
Block a user