String test = "14234325346@123.com";
//加密
String base = Base64.getEncoder().encodeToString(test.getBytes());
System.out.println(base);
//解密
String s2 = new String(Base64.getDecoder().decode(base));
System.out.println(s2);
Illegal base64 character 20报错如何解决
//base64 编码中使用了加号(+),而 + 在 URL 传递时会被当成空格,替换处理一下
String messageUrls = messageUrl.replaceAll(" ","+");