2026-02-06 17:56

@杜福忠 我的困惑时运行时map丢了,热加载重置我是能理解,现在不动代码正常了,我昨天没想通吧,给你添麻烦了

2026-02-06 17:15

@杜福忠 我用的木哥的jbolt插件在eclipse开发的,我现在把你这个工具类做成了plugin,测试着可以了可以通过action获取到 map了我一会儿把代码贴出来

2026-02-06 10:36

@杜福忠 大哥我用的jetty不是undertow,这有解决办法吗?还是把这个kit改成plugin插件?

2026-02-06 09:43

@杜福忠 谢谢大哥我试试,确实我开了热加载

2026-02-05 18:10

List> tasks=cron4jkit.getAllScheduler();
System.out.println(tasks);
JSONArray taskjson = new JSONArray();
for(Entry item :tasks) {
JSONObject json = new JSONObject();
json.set("configname", item.getValue().getConfigName());
json.set("cron", item.getValue().getCron());
json.set("taskclass",item.getValue().getRunnable().getClass().getName());
json.set("status",item.getValue().getScheduler().isStarted()?"运行中":"未运行");
taskjson.add(json);
}
setAttr("tasksjson", taskjson);
setAttr("taskclass",tasksrv.getAlltask());
render("taskmanager.html");
几分钟后MAP就为空了,而任务依然在执行,这是什么原因呢?大哥遇见过吗?

2020-06-15 11:38

@SuperEric @要输就输给追求 我也意识到了,我把list从后台输出成json前台对象接收,数组中的顺序一样,就能用了。