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

添加资源扫描接口

parent dc86e1a3
......@@ -29,6 +29,8 @@ public class ControllerScanUtil {
public static final String[] ULR_VIEW = {"view", "info", "list", "get", "find", "export", "download",
"index", "bill"};
public static final String[] WHITE_URL = {"login", "test"};
public static void main(String[] args) {
List<Class<?>> classList = getAllClassByPackageName("com.mortals.xhx");
......@@ -47,7 +49,7 @@ public class ControllerScanUtil {
if (!exits) {
continue;
}
//白名单地址的 也不需要
ResourceEntity resourceViewEntity = new ResourceEntity();
resourceViewEntity.initAttrValue();
ResourceEntity resourceEditEntity = new ResourceEntity();
......@@ -78,6 +80,16 @@ public class ControllerScanUtil {
String prefix = "";
if (requestMappingCls != null) {
prefix = "/" + requestMappingCls.value()[0];
boolean b = false;
for (String s : WHITE_URL) {
if (StrUtil.contains(requestMappingCls.value()[0].toLowerCase(), s)) {
b = true;
break;
}
}
if (b) {
continue;
}
}
if (ObjectUtils.isEmpty(result)) {
......
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