|
@ -24,7 +24,7 @@ public class ModuleAuthenInterceptor implements HandlerInterceptor { |
|
|
int count = 0; |
|
|
int count = 0; |
|
|
int index = -1; |
|
|
int index = -1; |
|
|
|
|
|
|
|
|
while(count < 2) { |
|
|
while(count < 3) { |
|
|
index = str.indexOf(c, index + 1); |
|
|
index = str.indexOf(c, index + 1); |
|
|
count++; |
|
|
count++; |
|
|
} |
|
|
} |
|
@ -33,8 +33,9 @@ public class ModuleAuthenInterceptor implements HandlerInterceptor { |
|
|
} |
|
|
} |
|
|
@Override |
|
|
@Override |
|
|
public boolean preHandle(HttpServletRequest request, HttpServletResponse response, Object handler) throws Exception { |
|
|
public boolean preHandle(HttpServletRequest request, HttpServletResponse response, Object handler) throws Exception { |
|
|
String uri = request.getRequestURI().substring(request.getRequestURI().indexOf("admin-api")+"admin-api".length()); |
|
|
String[] uris = request.getRequestURI().split("admin-api"); |
|
|
String moduleName = uri.substring(0,findThirdOccurrence(request.getRequestURI(),'/')); |
|
|
String uri = uris[uris.length-1]; |
|
|
|
|
|
String moduleName = uri.substring(0,findThirdOccurrence(uri,'/')); |
|
|
log.info(String.format("===uri-src=%s,uri-md5=%s===",moduleName,md5.digestHex(moduleName))); |
|
|
log.info(String.format("===uri-src=%s,uri-md5=%s===",moduleName,md5.digestHex(moduleName))); |
|
|
log.info(String.format("===cache=%s===", new JSONObject(ModuleAuthenUtils.module).toString())); |
|
|
log.info(String.format("===cache=%s===", new JSONObject(ModuleAuthenUtils.module).toString())); |
|
|
String endTimeStr = ModuleAuthenUtils.module.get(md5.digestHex(moduleName)); |
|
|
String endTimeStr = ModuleAuthenUtils.module.get(md5.digestHex(moduleName)); |
|
|