From 266f8b95ea781aa8b4f4c01c06c3b136ef41789b Mon Sep 17 00:00:00 2001 From: wizzer Date: Thu, 7 Jan 2021 23:58:16 +0800 Subject: [PATCH] =?UTF-8?q?add:=20=E5=88=A0=E9=99=A4jar=E4=BB=8E=E7=A3=81?= =?UTF-8?q?=E7=9B=98=E5=88=A0=E9=99=A4=E6=96=87=E4=BB=B6?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../web/controllers/platform/sys/SysAppController.java | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/src/main/java/com/budwk/app/web/controllers/platform/sys/SysAppController.java b/src/main/java/com/budwk/app/web/controllers/platform/sys/SysAppController.java index 2111afc3..18d097e7 100644 --- a/src/main/java/com/budwk/app/web/controllers/platform/sys/SysAppController.java +++ b/src/main/java/com/budwk/app/web/controllers/platform/sys/SysAppController.java @@ -19,9 +19,11 @@ import org.nutz.dao.Cnd; import org.nutz.dao.pager.Pager; import org.nutz.integration.jedis.RedisService; +import org.nutz.ioc.impl.PropertiesProxy; import org.nutz.ioc.loader.annotation.Inject; import org.nutz.ioc.loader.annotation.IocBean; import org.nutz.json.Json; +import org.nutz.lang.Files; import org.nutz.lang.Streams; import org.nutz.lang.Strings; import org.nutz.lang.stream.StringInputStream; @@ -36,6 +38,7 @@ import javax.servlet.http.HttpServletRequest; import javax.servlet.http.HttpServletResponse; +import java.io.File; import java.io.InputStream; import java.util.ArrayList; import java.util.Collections; @@ -59,6 +62,8 @@ public class SysAppController { private SysAppTaskService sysAppTaskService; @Inject private RedisService redisService; + @Inject + private PropertiesProxy conf; @At("") @Ok("beetl:/platform/sys/app/index.html") @@ -188,6 +193,9 @@ public Object jarSearch(@Param("appName") String appName) { @SLog(tag = "删除Jar包", msg = "ID:${id}") public Object jarDelete(String id, HttpServletRequest req) { try { + Sys_app_list appList = sysAppListService.fetch(id); + String staticPath = conf.get("jetty.staticPath", "/files"); + Files.deleteFile(new File(staticPath + appList.getFilePath())); sysAppListService.delete(id); return Result.success(); } catch (Exception e) {