refactor to move pricing plan logic out into a separate class

This commit is contained in:
priyank-sriv
2020-05-13 23:19:54 +05:30
parent 1b5a64c4a4
commit 34bbce7995
7 changed files with 67 additions and 34 deletions
@@ -3,21 +3,21 @@ server:
spring:
application:
name: bucket4j-starter-api-rate-limiting-app
name: bucket4j-starter-api-rate-limit-app
mvc:
throw-exception-if-no-handler-found: true
resources:
add-mappings: false
cache:
cache-names:
- rate-limiting-buckets
- rate-limit-buckets
caffeine:
spec: maximumSize=100000,expireAfterAccess=3600s
bucket4j:
enabled: true
filters:
- cache-name: rate-limiting-buckets
- cache-name: rate-limit-buckets
url: /api/v1/area.*
http-response-body: "{ \"status\": 429, \"error\": \"Too Many Requests\", \"message\": \"You have exhausted your API Request Quota\" }"
rate-limits:
@@ -38,4 +38,3 @@ bucket4j:
- capacity: 20
time: 1
unit: hours
@@ -3,8 +3,14 @@ server:
spring:
application:
name: bucket4j-api-rate-limiting-app
name: bucket4j-api-rate-limit-app
mvc:
throw-exception-if-no-handler-found: true
resources:
add-mappings: false
cache:
cache-names:
- rate-limit-buckets
caffeine:
spec: maximumSize=100000,expireAfterAccess=3600s