diff --git a/oh-my-scheduler-server/src/main/java/com/github/kfcfans/oms/server/common/utils/ContainerTemplateGenerator.java b/oh-my-scheduler-server/src/main/java/com/github/kfcfans/oms/server/common/utils/ContainerTemplateGenerator.java index 08b0c085..78a38c5c 100644 --- a/oh-my-scheduler-server/src/main/java/com/github/kfcfans/oms/server/common/utils/ContainerTemplateGenerator.java +++ b/oh-my-scheduler-server/src/main/java/com/github/kfcfans/oms/server/common/utils/ContainerTemplateGenerator.java @@ -37,8 +37,8 @@ public class ContainerTemplateGenerator { if (resource == null) { throw new RuntimeException("generate container template failed, can't find zip file in classpath."); } - String originTemplate = resource.getPath(); - ZipFile zipFile = new ZipFile(originTemplate); + + ZipFile zipFile = new ZipFile(resource.getFile()); String tmpPath = OmsFileUtils.genTemporaryPath(); zipFile.extractAll(tmpPath);