变更Base64使用包,使其兼容openjdk11

This commit is contained in:
yexuejc-vm-win10 2022-05-08 16:53:23 +08:00
parent 3987f982be
commit b97fdf65bc

View File

@ -246,10 +246,7 @@ public class ImgUtil {
* @throws IOException
*/
public static byte[] decode(String encodeStr) throws IOException {
byte[] bt = null;
BASE64Decoder decoder = new BASE64Decoder();
bt = decoder.decodeBuffer(encodeStr);
return bt;
return Base64.getDecoder().decode(encodeStr);
}
/**