WANG 5 년 전
부모
커밋
3057a4c88c
1개의 변경된 파일5개의 추가작업 그리고 0개의 파일을 삭제
  1. 5 0
      src/main/java/cn/com/qmth/examcloud/web/interceptor/ApiFlowLimitedInterceptor.java

+ 5 - 0
src/main/java/cn/com/qmth/examcloud/web/interceptor/ApiFlowLimitedInterceptor.java

@@ -93,6 +93,11 @@ public class ApiFlowLimitedInterceptor implements HandlerInterceptor {
 
 		boolean acquired = rateLimiter.tryAcquire();
 		if (!acquired) {
+
+			if (INTERFACE_LOG.isDebugEnabled()) {
+				INTERFACE_LOG.debug("[Limited]. ");
+			}
+
 			response.setStatus(HttpStatus.SERVICE_UNAVAILABLE.value());
 			ServletUtil.returnJson(new StatusResponse("503", "limited"), response);
 			return false;