diff --git a/src/main/java/nlib/cmm/crypto/AriaCrypto.java b/src/main/java/nlib/cmm/crypto/AriaCrypto.java index 21cf4eef..ad15b8a2 100644 --- a/src/main/java/nlib/cmm/crypto/AriaCrypto.java +++ b/src/main/java/nlib/cmm/crypto/AriaCrypto.java @@ -122,9 +122,8 @@ public class AriaCrypto { try { ret = AriaUtil.ariaDecrypt(value); - } catch(Exception e) { + } catch(UnsupportedEncodingException | InvalidKeyException e) { log.error("ERROR at AriaCrypto.decode : " + e.toString()); - e.printStackTrace(); ret = null; } diff --git a/src/main/java/nlib/cmm/crypto/AriaUtil.java b/src/main/java/nlib/cmm/crypto/AriaUtil.java index 85948455..c4c79fbd 100644 --- a/src/main/java/nlib/cmm/crypto/AriaUtil.java +++ b/src/main/java/nlib/cmm/crypto/AriaUtil.java @@ -104,6 +104,11 @@ public class AriaUtil { AriaEngine instance = new AriaEngine(256, privateKey); c = AriaEngine.hexToByteArray(strHex); + + if(c == null) + { + return null; + } p = new byte[c.length]; instance.decrypt(c, p, p.length); @@ -181,6 +186,11 @@ public class AriaUtil { AriaEngine instance = new AriaEngine(256, privateKey); c = hexToByteArray(strHex); + + if(c == null) + { + return null; + } p = new byte[c.length]; instance.decrypt(c, p, p.length); @@ -188,7 +198,7 @@ public class AriaUtil { buf.append(new String(p)); return buf.toString().trim(); } catch (Exception e) { - e.printStackTrace(); + log.error("ERROR at AriaCrypto.hexToByteArray : " + e.toString()); return originalData; } } @@ -282,6 +292,11 @@ public class AriaUtil { AriaEngine instance = new AriaEngine(256, privateKey); c = hexToByteArray(strHex); + + if(c == null) + { + return null; + } p = new byte[c.length]; instance.decrypt(c, p, p.length); @@ -307,6 +322,11 @@ public class AriaUtil { AriaEngine instance = new AriaEngine(256, privateKey); c = hexToByteArray(strHex); + + if(c == null) + { + return null; + } p = new byte[c.length]; instance.decrypt(c, p, p.length); diff --git a/src/main/java/nlib/restful/service/impl/DataApiRESTful.java b/src/main/java/nlib/restful/service/impl/DataApiRESTful.java index cf10b61c..f858bda3 100644 --- a/src/main/java/nlib/restful/service/impl/DataApiRESTful.java +++ b/src/main/java/nlib/restful/service/impl/DataApiRESTful.java @@ -104,11 +104,11 @@ public class DataApiRESTful implements DataApiInterface { statusCode = responseEntity.getStatusCode(); resultXML = responseEntity.getBody(); } catch(HttpClientErrorException e) { - //e.printStackTrace(); + log.error("request > HttpClientErrorException 발생 : " + e.toString()); resultXML = e.getResponseBodyAsString(); statusCode = e.getStatusCode(); } catch(HttpServerErrorException e) { - //e.printStackTrace(); + log.error("request > HttpServerErrorException 발생 : " + e.toString()); resultXML = e.getResponseBodyAsString(); statusCode = e.getStatusCode(); } @@ -121,11 +121,11 @@ public class DataApiRESTful implements DataApiInterface { statusCode = responseEntity.getStatusCode(); resultXML = responseEntity.getBody(); } catch(HttpClientErrorException e) { - e.printStackTrace(); + log.error("request > HttpClientErrorException 발생 : " + e.toString()); resultXML = e.getResponseBodyAsString(); statusCode = e.getStatusCode(); } catch(HttpServerErrorException e) { - e.printStackTrace(); + log.error("request > HttpServerErrorException 발생 : " + e.toString()); resultXML = e.getResponseBodyAsString(); statusCode = e.getStatusCode(); } @@ -159,8 +159,13 @@ public class DataApiRESTful implements DataApiInterface { log.debug("RES resVO : resultCode = " + resVO.getResultCode()); log.debug("RES resVO : resultMessage = " + resVO.getResultMessage()); + }catch(HttpClientErrorException e) { + log.error("request > HttpClientErrorException 발생 : " + e.toString()); + return DataApiInterface.makeErrorRes("E_REQ_HTTPCLIENTERROREXCEPTION", e.toString()); + }catch(HttpServerErrorException e) { + log.error("request > HttpServerErrorException 발생 : " + e.toString()); + return DataApiInterface.makeErrorRes("E_REQ_HTTPSERVERERROREXCEPTION", e.toString()); } catch(Exception e) { - e.printStackTrace(); log.error("request > Exception 발생 : " + e.toString()); return DataApiInterface.makeErrorRes("E_REQ_EXCEPTION", e.toString()); } diff --git a/src/main/java/nlib/util/EmailUtil.java b/src/main/java/nlib/util/EmailUtil.java index b872da6f..1c5b5833 100644 --- a/src/main/java/nlib/util/EmailUtil.java +++ b/src/main/java/nlib/util/EmailUtil.java @@ -103,7 +103,7 @@ public class EmailUtil{ public static String getPrintStackTrace(Exception e) { StringWriter errors = new StringWriter(); - e.printStackTrace(new PrintWriter(errors)); + log.error("ERROR at EmailUtil.getPrintStackTrace : " + e.toString()); return errors.toString(); diff --git a/src/main/webapp/WEB-INF/jsp/nlib/inform/selectNCultureLocationInfo.jsp b/src/main/webapp/WEB-INF/jsp/nlib/inform/selectNCultureLocationInfo.jsp index 083d8fac..f5c92394 100644 --- a/src/main/webapp/WEB-INF/jsp/nlib/inform/selectNCultureLocationInfo.jsp +++ b/src/main/webapp/WEB-INF/jsp/nlib/inform/selectNCultureLocationInfo.jsp @@ -39,6 +39,9 @@ $( document ).ready(function() { //--> +
![]()
주소
(${zipCode }) ${address } ${addressDetail }