本帖最后由 tiger_lixy 于 2018-4-17 13:30 编辑
引用这个类后org.apache.commons.codec.binary.Base64 用的是 ./compileBaas.sh baas在linux编译不通过,但是win和mac都可以编译通过。 错误如下: 开始编译BAAS Service Java...... log4j:WARN No appenders could be found for logger (com.justep.baas.BaasException). log4j:WARN Please initialize the log4j system properly. com.justep.baas.compiler.CompileException: 编译模块Java出错 ../../runtime/BaasServer/baas/portal/Portal.java:54: 错误: 不兼容的类型: String无法转换为byte if( Base64.isBase64(handPassword)){ ^ ../../runtime/BaasServer/baas/portal/Portal.java:55: 错误: 不兼容的类型: String无法转换为byte[] handPassword=new String(decryptMode(descKey,Base64.decodeBase64(handPassword))); ^ ../../runtime/BaasServer/baas/portal/Portal.java:100: 错误: 找不到符号 String encodePwd=Base64.encodeBase64String(encryptMode(descKey,handPassword.getBytes())); ^ 符号: 方法 encodeBase64String(byte[]) 位置: 类 Base64 ../../runtime/BaasServer/baas/portal/Portal.java:174: 错误: 不兼容的类型: String无法转换为byte if( Base64.isBase64(handPassword)==false){ ^ ../../runtime/BaasServer/baas/portal/Portal.java:175: 错误: 找不到符号 String encodePwd=Base64.encodeBase64String(encryptMode(descKey,handPassword.getBytes())); ^ 符号: 方法 encodeBase64String(byte[]) 位置: 类 Base64 ../../runtime/BaasServer/baas/portal/Portal.java:182: 错误: 不兼容的类型: String无法转换为byte[] String decodePwd=new String(decryptMode(descKey,Base64.decodeBase64(handPassword)));
源码简略: import org.apache.commons.codec.binary.Base64; 。。。。 if( Base64.isBase64(handPassword)){ handPassword=new String(decryptMode(descKey,Base64.decodeBase64(handPassword)));
}
|