|
@@ -39,6 +39,9 @@ public class ApiFlowLimitedInterceptor implements HandlerInterceptor {
|
|
private static final ExamCloudLog LOG = ExamCloudLogFactory
|
|
private static final ExamCloudLog LOG = ExamCloudLogFactory
|
|
.getLog(ApiFlowLimitedInterceptor.class);
|
|
.getLog(ApiFlowLimitedInterceptor.class);
|
|
|
|
|
|
|
|
+ private static final ExamCloudLog INTERFACE_LOG = ExamCloudLogFactory
|
|
|
|
+ .getLog("INTERFACE_LOGGER");
|
|
|
|
+
|
|
private static final RateLimiter rateLimiter;
|
|
private static final RateLimiter rateLimiter;
|
|
|
|
|
|
private static boolean enable = true;
|
|
private static boolean enable = true;
|
|
@@ -169,6 +172,10 @@ public class ApiFlowLimitedInterceptor implements HandlerInterceptor {
|
|
}
|
|
}
|
|
}
|
|
}
|
|
|
|
|
|
|
|
+ if (INTERFACE_LOG.isDebugEnabled()) {
|
|
|
|
+ INTERFACE_LOG.debug("[Limited]. mapping=" + apiInfo.getMapping());
|
|
|
|
+ }
|
|
|
|
+
|
|
response.setStatus(HttpStatus.SERVICE_UNAVAILABLE.value());
|
|
response.setStatus(HttpStatus.SERVICE_UNAVAILABLE.value());
|
|
ServletUtil.returnJson(new StatusResponse("503", "limited"), response);
|
|
ServletUtil.returnJson(new StatusResponse("503", "limited"), response);
|
|
return false;
|
|
return false;
|