diff --git a/src/main/java/com/fantaibao/config/GlobalConfig.java b/src/main/java/com/fantaibao/config/GlobalConfig.java index 5bfb26a..9fb1588 100644 --- a/src/main/java/com/fantaibao/config/GlobalConfig.java +++ b/src/main/java/com/fantaibao/config/GlobalConfig.java @@ -7,8 +7,8 @@ public class GlobalConfig { /** * 基础网络地址 */ - public static final String BASE_NET_URL = "http://127.0.0.1:9606"; - //public static final String BASE_NET_URL = "http://139.155.27.186:9607"; + //public static final String BASE_NET_URL = "http://127.0.0.1:9606"; + public static final String BASE_NET_URL = "http://139.155.27.186:9607"; /** * 登录接口地址 diff --git a/src/main/java/com/fantaibao/config/PlaywrightManager.java b/src/main/java/com/fantaibao/config/PlaywrightManager.java index a969619..ee923c9 100644 --- a/src/main/java/com/fantaibao/config/PlaywrightManager.java +++ b/src/main/java/com/fantaibao/config/PlaywrightManager.java @@ -22,12 +22,16 @@ public class PlaywrightManager { throw new RuntimeException("请使用getInstance()方法获取实例"); } try { - String exe4jDir = System.getenv("EXE4J_EXEDIR"); - log.info("exe4j目录为:{}",exe4jDir); + String property = System.getProperty("exe4j.launchName"); + // 从完整路径中提取目录路径 + if (StrUtil.isNotBlank(property)) { + property = property.substring(0, property.lastIndexOf('\\')); + } + log.info("exe4j目录为:{}",property); String playwrightBrowsersPath; - if (StrUtil.isNotBlank(exe4jDir)) { + if (StrUtil.isNotBlank(property)) { log.info("当前运行环境为exe4j环境,将使用exe4j目录下的ms-playwright目录"); - playwrightBrowsersPath = exe4jDir + "\\ms-playwright"; + playwrightBrowsersPath = property + "\\ms-playwright"; } else { playwrightBrowsersPath = System.getenv("PLAYWRIGHT_BROWSERS_PATH"); }