Commit dc86e1a3 authored by 赵啸非's avatar 赵啸非

添加资源扫描接口

parent ba4f7702
......@@ -56,11 +56,20 @@ public class ControllerScanUtil {
Method substringMethod = null;
String result = "";
try {
substringMethod = cls.getMethod("getModuleDesc");
result = (String) substringMethod.invoke(cls.newInstance());
resourceViewEntity.setName(result + "-查看");
resourceEditEntity.setName(result + "-维护");
String packName = cls.getPackage().getName();
if (StrUtil.contains(packName, "system")) {
//系统管理-xx管理-
substringMethod = cls.getMethod("getModuleDesc");
result = (String) substringMethod.invoke(cls.newInstance());
resourceViewEntity.setName("系统管理-" + result + "管理-查看");
resourceEditEntity.setName("系统管理-" + result + "管理-维护");
} else {
substringMethod = cls.getMethod("getModuleDesc");
result = (String) substringMethod.invoke(cls.newInstance());
resourceViewEntity.setName(result + "-查看");
resourceEditEntity.setName(result + "-维护");
}
} catch (Exception e) {
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment