Skip to content

Commit

Permalink
make sure all .yml files in examples have cache enabled and name prop…
Browse files Browse the repository at this point in the history
…erties
  • Loading branch information
EdwinHeuver92 committed Jan 20, 2024
1 parent ffce656 commit a2e4574
Show file tree
Hide file tree
Showing 10 changed files with 47 additions and 31 deletions.
1 change: 1 addition & 0 deletions examples/caffeine/src/main/resources/application.yml
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,7 @@ spring:
bucket4j:
enabled: true
filter-config-caching-enabled: true
filter-config-cache-name: filterConfigCache
filters:
- id: filter1
cache-name: buckets
Expand Down
2 changes: 2 additions & 0 deletions examples/caffeine/src/test/resources/application-servlet.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,8 @@ spring:
spec: maximumSize=1000000,expireAfterAccess=3600s
bucket4j:
enabled: true
filter-config-caching-enabled: true
filter-config-cache-name: filterConfigCache
filters:
- id: filter1
cache-name: buckets_test
Expand Down
1 change: 1 addition & 0 deletions examples/hazelcast/src/main/resources/application.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@ spring:
bucket4j:
enabled: true
filter-config-caching-enabled: true
filter-config-cache-name: filterConfigCache
filters:
- id: filter1
cache-name: buckets
Expand Down
3 changes: 2 additions & 1 deletion examples/redis-jedis/src/main/resources/application.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,8 @@ management:
bucket4j:
enabled: true
cache-to-use: redis-jedis
filter-config-caching-enabled: true
filter-config-cache-name: filterConfigCache
filters:
- cache-name: buckets_test
major-version: 2
Expand All @@ -35,7 +37,6 @@ bucket4j:
time: 10
unit: seconds
refill-speed: interval
filter-config-caching-enabled: true

spring:
main:
Expand Down
3 changes: 2 additions & 1 deletion examples/redis-lettuce/src/main/resources/application.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,8 @@ management:
bucket4j:
enabled: true
cache-to-use: redis-lettuce
filter-config-caching-enabled: true
filter-config-cache-name: filterConfigCache
filters:
- cache-name: buckets_test
id: filter1
Expand All @@ -34,7 +36,6 @@ bucket4j:
time: 10
unit: seconds
refill-speed: interval
filter-config-caching-enabled: true

spring:
main:
Expand Down
3 changes: 2 additions & 1 deletion examples/redis-redisson/src/main/resources/application.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,8 @@ management:
bucket4j:
enabled: true
cache-to-use: redis-redisson
filter-config-caching-enabled: true
filter-config-cache-name: filterConfigCache
filters:
- id: filter1
major-version: 1
Expand Down Expand Up @@ -39,7 +41,6 @@ bucket4j:
time: 10
unit: seconds
refill-speed: interval
filter-config-caching-enabled: true

spring:
main:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@ infinispan:
bucket4j:
enabled: true
filter-config-caching-enabled: true
filter-config-cache-name: filterConfigCache
filters:
- id: filter1
cache-name: buckets
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@ infinispan:
bucket4j:
enabled: true
filter-config-caching-enabled: true
filter-config-cache-name: filterConfigCache
filters:
- id: filter1
cache-name: buckets_test
Expand Down
61 changes: 33 additions & 28 deletions examples/webflux/src/main/resources/application.yml
Original file line number Diff line number Diff line change
@@ -1,28 +1,33 @@
logging:
level:
com.giffing.bucket4j.spring.boot.starter: debug
management:
endpoints:
web:
exposure:
include: "*"
spring: cache: type: hazelcast
bucket4j:
enabled: true
filters:
- cache-name: buckets
filter-method: webflux
url: .*
http-content-type: application/json;charset=UTF-8
http-response-body: '{ "name": "hello"}'
http-response-headers: HELLO: WORLD
filter-order: 1
rate-limits:
- execute-predicates:
- name: PATH=/hell**
- name: METHOD=GET
- name: HEADER=User-Agent,.*
bandwidths:
- capacity: 5
time: 10
unit: seconds
logging:
level:
com.giffing.bucket4j.spring.boot.starter: debug
management:
endpoints:
web:
exposure:
include: "*"
spring:
cache:
type: hazelcast
bucket4j:
enabled: true
filter-config-caching-enabled: true
filter-config-cache-name: filterConfigCache
filters:
- cache-name: buckets
filter-method: webflux
url: .*
http-content-type: application/json;charset=UTF-8
http-response-body: '{ "name": "hello"}'
http-response-headers:
HELLO: WORLD
filter-order: 1
rate-limits:
- execute-predicates:
- name: PATH=/hell**
- name: METHOD=GET
- name: HEADER=User-Agent,.*
bandwidths:
- capacity: 5
time: 10
unit: seconds
2 changes: 2 additions & 0 deletions examples/webflux/src/test/resources/application-webflux.yml
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
bucket4j:
enabled: true
filter-config-caching-enabled: true
filter-config-cache-name: filterConfigCache
filters:
- id: filter1
cache-name: buckets_test
Expand Down

0 comments on commit a2e4574

Please sign in to comment.