‘liusuyi’
2023-10-24 5addedcb92fcd56239825f301502aabbeaf5e325
ard-work/src/main/java/com/ruoyi/device/dhsdk/lib/LibraryLoad.java
@@ -1,6 +1,7 @@
package com.ruoyi.device.dhsdk.lib;
import com.ruoyi.device.dhsdk.lib.DynamicParseUtil;
import lombok.extern.slf4j.Slf4j;
import org.xml.sax.SAXException;
import javax.xml.parsers.ParserConfigurationException;
@@ -12,6 +13,7 @@
 * @description 动态库加载
 * @date 2020/11/14
 */
@Slf4j(topic = "dhSdk")
public class LibraryLoad {
  private static final String ARCH_WINDOWS = "win";
  private static final String ARCH_LINUX = "linux";
@@ -74,7 +76,7 @@
    if (!(EXTRACT_PATH.endsWith("/") || EXTRACT_PATH.endsWith("\\"))) {
      path = EXTRACT_PATH + "/";
    }
    System.out.println("load library: " + path + fullName);
    log.debug("load library: " + path + fullName);
    return path + fullName;
  }
@@ -137,7 +139,7 @@
            writer.close();
            in.close();
        } catch (Exception e) {
            System.out.println("dynamic file[ " + fileName + " ] not found in project.please ensure you need this library.");
           log.error("dynamic file[ " + fileName + " ] not found in project.please ensure you need this library.");
        }
        return extractedLibFile != null ? extractedLibFile.getAbsolutePath() : "";
    }