Ratelimiter Spring Boot Starter Versions Save

基于 redis 的偏业务应用的分布式限流组件,使得项目拥有分布式限流能力变得很简单。

v1.3

1 year ago

v1.3 版本更新内容

  • 1、配置策略变化,不在从应用的上下文中获取 Redis 数据源,而是必须配置。但是配置的数据源在 Spring 上下文中声明了 rateLimiterRedissonBeanName,应用也可以获取使用
  • 2、代码重构,新增了令牌桶的限流策略支持
  • 3、抽象了限流器服务 RateLimiterService,并在 Spring 上下文中声明了,应用可以直接注入使用

jar 包已上传到中央仓库

maven

<dependency>
  <groupId>com.github.taptap</groupId>
  <artifactId>ratelimiter-spring-boot-starter</artifactId>
  <version>1.3</version>
</dependency>

gradle

implementation 'com.taptap:ratelimiter-spring-boot-starter:1.3'

v1.2

3 years ago

v1.2 版本更新内容

1、触发限流时,响应的类型从 text/plain 变成了 application/json https://github.com/TapTap/ratelimiter-spring-boot-starter/commit/7b0dde45b70b5ab56b76d1baf529189458baddca 2、优化了限流的 lua 脚本,将原来的两步 lua 脚本请求,合并成了一个,减少了和 redis 的交互 https://github.com/TapTap/ratelimiter-spring-boot-starter/commit/9c179779bf5d670cec9e17154346e5732b6c9b53 3、限流的时间窗口大小,支持 Spel 从 Spring 的配置上下文中获取,结合 apollo 等配置中心后,支持规则的动态下发热更 https://github.com/TapTap/ratelimiter-spring-boot-starter/commit/c52149f098da4c171a127426256319c1ee81b4fa

jar 包已上传到中央仓库

maven

<dependency>
  <groupId>com.github.taptap</groupId>
  <artifactId>ratelimiter-spring-boot-starter</artifactId>
  <version>1.2</version>
</dependency>

gradle

implementation 'com.taptap:ratelimiter-spring-boot-starter:1.2'