use of io.jpom.service.WhitelistDirectoryService in project Jpom by dromara.
the class NodeProjectInfoModel method repairWhitelist.
private void repairWhitelist() {
if (StrUtil.isEmpty(whitelistDirectory) && StrUtil.isEmpty(lib)) {
throw new JpomRuntimeException("当前项目lib数据异常");
}
if (StrUtil.isNotEmpty(whitelistDirectory)) {
return;
}
WhitelistDirectoryService whitelistDirectoryService = SpringUtil.getBean(WhitelistDirectoryService.class);
List<String> project = whitelistDirectoryService.getWhitelist().getProject();
for (String path : project) {
if (lib.startsWith(path)) {
String itemWhitelistDirectory = lib.substring(0, path.length());
lib = lib.substring(path.length());
setWhitelistDirectory(itemWhitelistDirectory);
setLib(lib);
}
}
}
Aggregations