Tencent’s Sdk4J.jar conflicts with Alipay’s JAR commons-codec-1.6.jar. what should I do?

  java, question

Tencent’s Sdk4J.jar conflicts with Alipay’s JAR commons-codec-1.6.jar. How do you handle the conflict? Have you met

Javapublic static String getAbstract(String strFilePath, String file_digest_type) throws IOException {
 PartSource file = new FilePartSource(new File(strFilePath));
 if(file_digest_type.equals("MD5")){
 return DigestUtils.md5Hex(file.createInputStream());
 } else if(file_digest_type.equals("SHA")) {
 return DigestUtils.sha256Hex(file.createInputStream());
 } else {
 return "";
 bracket
 bracket

图片描述

Alipay’sDigestUtils.md5HexThe method iscommons-codec-1.6.jarinsideorg.apache.commons.codec.digest DigestUtils.class; Tencent used himselfSdk4J.jarinsideorg.apache.commons.codec.digest DigestUtils.class, so it conflicts

图片描述

图片描述

Common-codec is a separate jar package. You can dereference this jar package directly and try it. I think as long as the code introduced by the two libraries is the same, deleting one of them will not cause any problems.