Class IpLimitTypeStrategy
java.lang.Object
com.codeupsoft.interceptor.ratelimit.strategy.impl.IpLimitTypeStrategy
- All Implemented Interfaces:
RateLimitTypeStrategy
IP限流策略实现.
基于客户端IP地址的限流策略实现,同一个IP在相同时间内只能访问指定次数.
- Author:
- Liu,Dongdong, codeupsoft
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptiongetLimitKey(String key, org.springframework.web.method.HandlerMethod handlerMethod, jakarta.servlet.http.HttpServletRequest request)
-
Constructor Details
-
IpLimitTypeStrategy
public IpLimitTypeStrategy()
-
-
Method Details
-
getLimitType
- Specified by:
getLimitTypein interfaceRateLimitTypeStrategy
-
getLimitKey
public String getLimitKey(String key, org.springframework.web.method.HandlerMethod handlerMethod, jakarta.servlet.http.HttpServletRequest request) - Specified by:
getLimitKeyin interfaceRateLimitTypeStrategy
-