Skip to content

Commit

Permalink
feature: update plugin module
Browse files Browse the repository at this point in the history
  • Loading branch information
wangqi committed Oct 17, 2024
1 parent ee83b4f commit 37979d5
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 94 deletions.

This file was deleted.

Original file line number Diff line number Diff line change
Expand Up @@ -31,15 +31,6 @@ protected PluginRepository createPluginRepository() {
.add(new CustomPluginRepository());
}

// @Override
// protected ExtensionFinder createExtensionFinder() {
// DefaultExtensionFinder extensionFinder = new DefaultExtensionFinder(this);
// extensionFinder.addServiceProviderExtensionFinder();
// addPluginStateListener(extensionFinder);
//
// return extensionFinder;
// }

@Override
protected PluginStatusProvider createPluginStatusProvider() {
return new CustomPluginStatusProvider();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -143,17 +143,17 @@ public boolean enable(Long id) {
update(updateWrapper);
// 启用插件信息
return pf4jService.enablePlugin(pluginId);
// 插件启用完毕后,不能删除通过 http 下载的 jar。插件后续仍需读取 LegacyExtensionFinder.EXTENSIONS_RESOURCE
} catch (IOException e) {
log.error(e.getMessage(), e);
throw new RuntimeException(e);
} finally {
if (path != null) {
try {
FileUtil.deleteFile(path);
} catch (IOException e) {
throw new RuntimeException(e);
} catch (IOException ex) {
throw new RuntimeException(ex);
}
}
throw new RuntimeException(e);
}
}

Expand Down

0 comments on commit 37979d5

Please sign in to comment.