【scanner】更新资源扫描

pull/3/head
fengshuonan 2021-01-16 15:39:23 +08:00
parent 227e647c5d
commit 0d78b68089
2 changed files with 3 additions and 1 deletions

View File

@ -315,7 +315,8 @@ public class ApiResourceScanner implements BeanPostProcessor {
controllerPath = "/" + controllerPath;
}
return controllerPath + path;
// 前缀多个左斜杠替换为一个
return (controllerPath + path).replaceAll("/+", "/");
}
/**

View File

@ -101,6 +101,7 @@ public class SysResourceServiceImpl extends ServiceImpl<SysResourceMapper, SysRe
// 1. 获取所有的资源
LambdaQueryWrapper<SysResource> sysResourceLambdaQueryWrapper = new LambdaQueryWrapper<>();
sysResourceLambdaQueryWrapper.eq(SysResource::getViewFlag, YesOrNotEnum.N.getCode());
sysResourceLambdaQueryWrapper.select(SysResource::getAppCode, SysResource::getModularCode, SysResource::getModularName, SysResource::getResourceCode, SysResource::getUrl, SysResource::getResourceName);
List<SysResource> allResource = this.list(sysResourceLambdaQueryWrapper);