refactor to move pricing plan logic out into a separate class
This commit is contained in:
+3
-4
@@ -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
|
||||
|
||||
+7
-1
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user