update
This commit is contained in:
@@ -34,7 +34,7 @@ public class TestStr {
|
||||
public void testStringSplitError() {
|
||||
String conditionValue = "qweqwe";
|
||||
String[] conditionValueArray = conditionValue.split(",");
|
||||
System.out.println("length = "+ conditionValueArray.length);
|
||||
System.out.println("length = " + conditionValueArray.length);
|
||||
Arrays.stream(conditionValueArray).forEach(System.out::println);
|
||||
}
|
||||
|
||||
@@ -45,16 +45,16 @@ public class TestStr {
|
||||
valArray.add("qwe");
|
||||
System.out.println("值: " + StringUtils.join(valArray, ","));
|
||||
}
|
||||
|
||||
|
||||
@Test
|
||||
public void testSql() {
|
||||
String sql = "select * from sys_user where sex = ${sex}";
|
||||
sql = sql.replaceAll("'?\\$\\{sex}'?","1");
|
||||
sql = sql.replaceAll("'?\\$\\{sex}'?", "1");
|
||||
System.out.println(sql);
|
||||
}
|
||||
|
||||
@Test
|
||||
public void base64(){
|
||||
public void base64() {
|
||||
String encodedString = "5L+d5a2Y5aSx6LSl77yM5YWN6LS554mI5pyA5aSa5Yib5bu6ezB95p2h6L+e5o6l77yM6K+35Y2H57qn5ZWG5Lia54mI77yB";
|
||||
byte[] decodedBytes = Base64.getDecoder().decode(encodedString);
|
||||
String decodedString = new String(decodedBytes);
|
||||
|
||||
Reference in New Issue
Block a user