Class DefaultSpElLimitTypeStrategy
java.lang.Object
com.codeupsoft.interceptor.ratelimit.strategy.impl.DefaultSpElLimitTypeStrategy
- All Implemented Interfaces:
RateLimitTypeStrategy
默认限流key生成策略实现.
基于SpEL表达式的限流key生成策略,支持从请求中提取各种信息生成限流key.
- 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
-
DefaultSpElLimitTypeStrategy
public DefaultSpElLimitTypeStrategy()
-
-
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
-