system_out_제거
This commit is contained in:
@@ -52,6 +52,6 @@ public class ByteCharSequence implements CharSequence{
|
||||
if (m.find()){
|
||||
index = m.start();
|
||||
}
|
||||
System.out.println("index = " + index);
|
||||
// System.out.println("index = " + index);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -51,20 +51,20 @@ public class CryptoUtil {
|
||||
String key = "ONAuROzlqWB4VuBwO5C/FA==";
|
||||
String text = "Hello AES 한글";
|
||||
|
||||
System.out.println("Original Text: " + text);
|
||||
// System.out.println("Original Text: " + text);
|
||||
|
||||
long startEncryptTime = System.nanoTime();
|
||||
String enc = encryptAES(key, text);
|
||||
long endEncryptTime = System.nanoTime();
|
||||
long encryptDuration = endEncryptTime - startEncryptTime;
|
||||
System.out.println("Encrypted Text: " + enc);
|
||||
System.out.println("Encryption took: " + encryptDuration + " nanoseconds");
|
||||
// System.out.println("Encrypted Text: " + enc);
|
||||
// System.out.println("Encryption took: " + encryptDuration + " nanoseconds");
|
||||
|
||||
long startDecryptTime = System.nanoTime();
|
||||
String dec = decryptAES(key, enc);
|
||||
long endDecryptTime = System.nanoTime();
|
||||
long decryptDuration = endDecryptTime - startDecryptTime;
|
||||
System.out.println("Decrypted Text: " + dec);
|
||||
System.out.println("Decryption took: " + decryptDuration + " nanoseconds");
|
||||
// System.out.println("Decrypted Text: " + dec);
|
||||
// System.out.println("Decryption took: " + decryptDuration + " nanoseconds");
|
||||
}
|
||||
}
|
||||
@@ -38,9 +38,9 @@ public class IpUtil {
|
||||
String matchdIps = "192.168.0.1,192.168.0.0/24,192.168.1.*";
|
||||
String requestIp = "192.168.1.2";
|
||||
if (IpUtil.isMatchIp(matchdIps, requestIp)) {
|
||||
System.out.println(true);
|
||||
// System.out.println(true);
|
||||
} else {
|
||||
System.out.println(false);
|
||||
// System.out.println(false);
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
@@ -135,7 +135,7 @@ public class JsonBeatiUtil {
|
||||
data += "} ";
|
||||
data = "{\"EAI_UJSON2DEPTHEXT_REQ1\":{\"abc\":\"cba \",\"grid1\":[{\"long1\":1,\"data2\":\" \",\"grid2\":[{\"data3\":\"12345\",\"big4\":\"14.00000\"},{\"data3\":\"13 \",\"big4\":\"14.00001\"}]},{\"long1\":10000,\"data2\":\" \",\"grid2\":[{\"data3\":\"23 \",\"big4\":\"24.00000\"}]},{\"long1\":1000000000,\"data2\":\" \",\"grid2\":[{\"data3\":\"33 \",\"big4\":\"0.00000\"},{\"data3\":\" \",\"big4\":\"0.00034\"},{\"data3\":\"35 \",\"big4\":\"0.00036\"}]}],\"abcd\":\"123\",\"grid3\":[{\"long1\":1,\"data2\":\" \",\"grid4\":[{\"data5\":\"00023\",\"big6\":\"24\"}]},{\"long1\":1000000000,\"data2\":\" \",\"grid4\":[{\"data5\":\"00033\",\"big6\":\"0\"},{\"data5\":\" \",\"big6\":\"34\"},{\"data5\":\"00035\",\"big6\":\"900000003600011\"}]}]}}";
|
||||
|
||||
System.out.println(JsonBeatiUtil.SimpleBeautiful(data));
|
||||
// System.out.println(JsonBeatiUtil.SimpleBeautiful(data));
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@@ -104,22 +104,22 @@ public class JsonPathUtil {
|
||||
public static void main(String[] args) {
|
||||
String jsonString = "{ \"person\": { \"name\": \"John\", \"age\": 30, \"groups\": [ { \"id\": 1, \"name\": \"Group A\" }, { \"id\": 2, \"name\": \"Group B\" }, { \"id\": 3, \"name\": \"Group C\" } ] } }";
|
||||
|
||||
System.out.println("Source JSON: \n" + jsonString);
|
||||
// System.out.println("Source JSON: \n" + jsonString);
|
||||
|
||||
// 경로를 사용하여 값 가져오기 (반복되는 그룹 포함)
|
||||
String getPath = "/person/groups/1/name";
|
||||
String secondGroupName = getValueAtPath(jsonString, getPath);
|
||||
System.out.println("getPath: " + getPath + " -> " + secondGroupName);
|
||||
// System.out.println("getPath: " + getPath + " -> " + secondGroupName);
|
||||
|
||||
// 경로를 사용하여 값 설정하기 (반복되는 그룹 포함) 및 Pretty 출력
|
||||
String putPath = "/person/groups/2/name";
|
||||
String updatedJsonString = setValueAtPath(jsonString, putPath, "Group Z", true);
|
||||
System.out.println("putPath: " + putPath);
|
||||
System.out.println("Updated JSON (Pretty): \n" + updatedJsonString);
|
||||
// System.out.println("putPath: " + putPath);
|
||||
// System.out.println("Updated JSON (Pretty): \n" + updatedJsonString);
|
||||
|
||||
getPath = "/person/name";
|
||||
System.out.println("getPath: " + getPath + " -> " + getValueAtPath(jsonString, getPath));
|
||||
// System.out.println("getPath: " + getPath + " -> " + getValueAtPath(jsonString, getPath));
|
||||
getPath = "/person/age";
|
||||
System.out.println("getPath: " + getPath + " -> " + getValueAtPath(jsonString, getPath));
|
||||
// System.out.println("getPath: " + getPath + " -> " + getValueAtPath(jsonString, getPath));
|
||||
}
|
||||
}
|
||||
|
||||
@@ -47,7 +47,7 @@ public class JsonPathsTransform {
|
||||
String encLog = transformer.getClass().getName() + " : "
|
||||
+ String.format("path=%s, orgText[%s] plain[%s] newText[%s]", path, currentValue,
|
||||
transformer.getProperty("PLAIN_VALUE"), newValue);
|
||||
System.out.println(encLog);
|
||||
// System.out.println(encLog);
|
||||
logger.debug(encLog);
|
||||
}
|
||||
} catch (Exception e) {
|
||||
|
||||
@@ -30,7 +30,7 @@ public class JsonSimplePathsTransform {
|
||||
if(logger.isDebug()) {
|
||||
// FIXME : kbank - 로그내용 수정
|
||||
String encLog = transformer.getClass().getName() +" : "+ String.format("path=%s, orgText[%s] plain[%s] newText[%s]", path, currentValue, transformer.getProperty("PLAIN_VALUE"), newValue);
|
||||
System.out.println(encLog);
|
||||
// System.out.println(encLog);
|
||||
logger.debug(encLog);
|
||||
}
|
||||
setNodeValue(getParentNode(rootNode, getParentPath(path)), getFieldName(path), newValue);
|
||||
|
||||
Reference in New Issue
Block a user