diff --git a/designer-base/src/main/java/com/fr/design/backup/DesignContext.java b/designer-base/src/main/java/com/fr/design/backup/DesignContext.java index e2aebc14db..ef5f99e396 100644 --- a/designer-base/src/main/java/com/fr/design/backup/DesignContext.java +++ b/designer-base/src/main/java/com/fr/design/backup/DesignContext.java @@ -7,6 +7,7 @@ import com.fr.stable.StringUtils; import javax.servlet.ServletContext; +import java.io.File; import java.util.Properties; /** @@ -17,7 +18,7 @@ import java.util.Properties; * Created on 2024/5/14 */ public class DesignContext extends CarinaApplicationContext { - public static final String WEB_INF = "\\WEB-INF"; + public static final String WEB_INF = "WEB-INF"; private String designWebInfPath; private String designDataPath; @@ -39,7 +40,7 @@ public class DesignContext extends CarinaApplicationContext { public void setDesignWebInfPath(String designWebInfPath) { this.designWebInfPath = designWebInfPath; if (StringUtils.isNotEmpty(this.designWebInfPath)) { - this.designDataPath = this.designWebInfPath.replace(WEB_INF, StringUtils.EMPTY); + this.designDataPath = this.designWebInfPath.replace(File.separatorChar + WEB_INF, StringUtils.EMPTY); } FineLoggerFactory.getLogger().info("[DesignContext] designWebInfPath:{}, designDataPath:{}", this.designWebInfPath, this.designDataPath); }