remove pbean

This commit is contained in:
Anthony Stirling 2023-08-14 21:42:31 +01:00
parent 95dced6455
commit 563c612395

View file

@ -19,14 +19,6 @@ import io.github.bucket4j.Refill;
@Configuration
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
public void addInterceptors(InterceptorRegistry registry) {
registry.addInterceptor(localeChangeInterceptor());