在Tomcat9容器 解密(前端用Base64加密的)汉字出现乱码,IDEA中调试正常
修改Base64解密的方法
public static String Base64ToStr(String s) {
if (s == null)
return null;
BASE64Decoder decoder = new BASE64Decoder();
try {
byte[] b = decoder.decodeBuffer(s);
return new String(b, "UTF-8");
} catch (Exception e) {
return null;
}
}
原因分下看到大
原创
2020-06-01 11:58:50 ·
478 阅读 ·
0 评论