remove pbean
This commit is contained in:
parent
95dced6455
commit
563c612395
1 changed files with 0 additions and 8 deletions
|
@ -18,14 +18,6 @@ import io.github.bucket4j.Refill;
|
||||||
|
|
||||||
@Configuration
|
@Configuration
|
||||||
public class Beans implements WebMvcConfigurer {
|
public class Beans implements WebMvcConfigurer {
|
||||||
|
|
||||||
@Bean
|
|
||||||
public Bucket createRateLimitBucket() {
|
|
||||||
Refill refill = Refill.of(1000, Duration.ofDays(1));
|
|
||||||
Bandwidth limit = Bandwidth.classic(1000, refill).withInitialTokens(1000);
|
|
||||||
return Bucket4j.builder().addLimit(limit).build();
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void addInterceptors(InterceptorRegistry registry) {
|
public void addInterceptors(InterceptorRegistry registry) {
|
||||||
|
|
Loading…
Add table
Reference in a new issue