This commit is contained in:
ls
2024-11-05 11:00:34 +08:00
parent 83fa274068
commit 639d0ee799
541 changed files with 29300 additions and 26585 deletions

View File

@@ -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);