Skip to content

Commit

Permalink
feat: use kebab cases for properties
Browse files Browse the repository at this point in the history
  • Loading branch information
rajadilipkolli committed Nov 16, 2023
1 parent a1601c7 commit 84ecc49
Show file tree
Hide file tree
Showing 12 changed files with 108 additions and 108 deletions.
30 changes: 15 additions & 15 deletions api-gateway/src/main/resources/application.yml
Original file line number Diff line number Diff line change
Expand Up @@ -36,8 +36,8 @@ spring:
- name: RequestRateLimiter
args:
redis-rate-limiter:
replenishRate: 60
burstCapacity: 10
replenish-rate: 60
burst-capacity: 10
- id: inventory-service
predicates:
- Path=/inventory-service/**
Expand All @@ -46,7 +46,7 @@ spring:
- name: CircuitBreaker
args:
name: exampleSlowCircuitBreaker
fallbackUri: forward:/fallback/api/inventory
fallback-uri: forward:/fallback/api/inventory
- id: catalog-service
predicates:
- Path=/catalog-service/**
Expand All @@ -56,10 +56,10 @@ spring:
retries: 3
method: GET
backoff:
firstBackoff: 50ms
maxBackoff: 500ms
first-backoff: 50ms
max-backoff: 500ms
factor: 2
basedOnPreviousValue: true
based-on-previous-value: true
uri: lb://catalog-service
- id: payment-service
predicates:
Expand All @@ -77,16 +77,16 @@ spring:
resilience4j:
circuitbreaker:
instances:
catalogService:
slidingWindowSize: 10
permittedNumberOfCallsInHalfOpenState: 5
failureRateThreshold: 50
waitDurationInOpenState: 10000
registerHealthIndicator: true
catalog-service:
sliding-window-size: 10
permitted-number-of-calls-in-half-open-state: 5
failure-rate-threshold: 50
wait-duration-in-open-state: 10000
register-health-indicator: true
timelimiter:
instances:
catalogService:
timeoutDuration: 3s
catalog-service:
timeout-duration: 3s

springdoc:
cache:
Expand All @@ -99,5 +99,5 @@ springdoc:
# adding this so that List<groupedopenapi> bean will trigger
group-configs[0]:
group: api-gateway
pathsToMatch: /**
paths-to-match: /**
# packagesToScan: com.example.api.gateway.web
54 changes: 27 additions & 27 deletions catalog-service/src/main/resources/application-local.properties
Original file line number Diff line number Diff line change
Expand Up @@ -22,32 +22,32 @@ spring.cloud.config.enabled=false
spring.cloud.discovery.enabled=false


resilience4j.bulkhead.instances.default.maxConcurrentCalls=20
resilience4j.bulkhead.instances.default.maxWaitDuration=10ms
resilience4j.bulkhead.instances.product-api.maxConcurrentCalls=10
resilience4j.ratelimiter.instances.default.limitForPeriod=10
resilience4j.ratelimiter.instances.default.limitRefreshPeriod=10s
resilience4j.ratelimiter.instances.default.timeoutDuration=3s
resilience4j.ratelimiter.instances.default.registerHealthIndicator=true
resilience4j.bulkhead.instances.default.max-concurrent-calls=20
resilience4j.bulkhead.instances.default.max-wait-duration=10ms
resilience4j.bulkhead.instances.product-api.max-concurrent-calls=10
resilience4j.ratelimiter.instances.default.limit-for-period=10
resilience4j.ratelimiter.instances.default.limit-refresh-period=10s
resilience4j.ratelimiter.instances.default.timeout-duration=3s
resilience4j.ratelimiter.instances.default.register-health-indicator=true
#resilience4j.retry.retryAspectOrder=2
resilience4j.retry.configs.default.maxAttempts=3
resilience4j.retry.configs.default.waitDuration=100
resilience4j.retry.configs.default.retryExceptions[0]=org.springframework.web.client.HttpServerErrorException
resilience4j.retry.configs.default.retryExceptions[1]=java.util.concurrent.TimeoutException
resilience4j.retry.configs.default.retryExceptions[2]=java.io.IOException
resilience4j.retry.configs.default.ignoreExceptions[0]=com.example.catalogservice.exception.ProductNotFoundException
resilience4j.retry.instances.default.baseConfig=default
resilience4j.retry.instances.getInventoryByProductCodes.baseConfig=default
resilience4j.retry.configs.default.max-attempts=3
resilience4j.retry.configs.default.wait-duration=100
resilience4j.retry.configs.default.retry-exceptions[0]=org.springframework.web.client.HttpServerErrorException
resilience4j.retry.configs.default.retry-exceptions[1]=java.util.concurrent.TimeoutException
resilience4j.retry.configs.default.retry-exceptions[2]=java.io.IOException
resilience4j.retry.configs.default.ignore-exceptions[0]=com.example.catalogservice.exception.ProductNotFoundException
resilience4j.retry.instances.default.base-config=default
resilience4j.retry.instances.get-inventory-by-product-codes.base-config=default
#resilience4j.circuitbreaker.circuitBreakerAspectOrder=1
resilience4j.circuitbreaker.instances.default.registerHealthIndicator=true
resilience4j.circuitbreaker.instances.default.slidingWindowSize=5
resilience4j.circuitbreaker.instances.default.minimumNumberOfCalls=2
resilience4j.circuitbreaker.instances.default.failureRateThreshold=100
resilience4j.circuitbreaker.instances.default.permittedNumberOfCallsInHalfOpenState=2
resilience4j.circuitbreaker.instances.default.automaticTransitionFromOpenToHalfOpenEnabled=true
resilience4j.circuitbreaker.instances.getInventoryByProductCodes.registerHealthIndicator=true
resilience4j.circuitbreaker.instances.getInventoryByProductCodes.slidingWindowSize=10
resilience4j.circuitbreaker.instances.getInventoryByProductCodes.permittedNumberOfCallsInHalfOpenState=2
resilience4j.circuitbreaker.instances.getInventoryByProductCodes.automaticTransitionFromOpenToHalfOpenEnabled=true
resilience4j.timelimiter.instances.default.timeoutDuration=10s
resilience4j.timelimiter.instances.default.cancelRunningFuture=true
resilience4j.circuitbreaker.instances.default.register-health-indicator=true
resilience4j.circuitbreaker.instances.default.sliding-window-size=5
resilience4j.circuitbreaker.instances.default.minimum-number-of-calls=2
resilience4j.circuitbreaker.instances.default.failure-rate-threshold=100
resilience4j.circuitbreaker.instances.default.permitted-number-of-calls-in-half-open-state=2
resilience4j.circuitbreaker.instances.default.automatic-transition-from-open-to-half-open-enabled=true
resilience4j.circuitbreaker.instances.get-inventory-by-product-codes.register-health-indicator=true
resilience4j.circuitbreaker.instances.get-inventory-by-product-codes.sliding-window-size=10
resilience4j.circuitbreaker.instances.get-inventory-by-product-codes.permitted-number-of-calls-in-half-open-state=2
resilience4j.circuitbreaker.instances.get-inventory-by-product-codes.automatic-transition-from-open-to-half-open-enabled=true
resilience4j.timelimiter.instances.default.timeout-duration=10s
resilience4j.timelimiter.instances.default.cancel-running-future=true
6 changes: 3 additions & 3 deletions catalog-service/src/main/resources/application.properties
Original file line number Diff line number Diff line change
Expand Up @@ -5,10 +5,10 @@ spring.webflux.base-path=/${spring.application.name}

#Producer
# spring.cloud.stream.kafka.binder.brokers=localhost:9092
spring.cloud.stream.kafka.binder.enableObservation=true
spring.cloud.stream.kafka.binder.enable-observation=true

spring.cloud.stream.bindings.inventory-out-0.destination=productTopic
spring.cloud.stream.bindings.inventory-out-0.contentType=application/json
spring.cloud.stream.bindings.inventory-out-0.content-type=application/json
#To use custom serializer we should use native encoding as true
spring.cloud.stream.bindings.inventory-out-0.producer.use-native-encoding=true

Expand All @@ -22,7 +22,7 @@ spring.cloud.stream.kafka.default.producer.configuration.value.serializer=org.sp
application.inventory-service-url=http://localhost:18181/inventory-service

#Enabling r2dbc observation and health
management.observations.r2dbc.includeParameterValues=true
management.observations.r2dbc.include-parameter-values=true
management.health.r2dbc.enabled=true

# Eureka Client to use WebClientInstead of RestTemplate
Expand Down
46 changes: 23 additions & 23 deletions catalog-service/src/test/resources/application-test.properties
Original file line number Diff line number Diff line change
Expand Up @@ -9,31 +9,31 @@ spring.cloud.discovery.enabled=false
spring.threads.virtual.enabled=true


resilience4j.bulkhead.instances.default.maxConcurrentCalls=20
resilience4j.bulkhead.instances.default.maxWaitDuration=10ms
resilience4j.bulkhead.instances.product-api.maxConcurrentCalls=10
resilience4j.ratelimiter.instances.default.limitForPeriod=10
resilience4j.ratelimiter.instances.default.limitRefreshPeriod=10s
resilience4j.ratelimiter.instances.default.timeoutDuration=3s
resilience4j.ratelimiter.instances.default.registerHealthIndicator=true
resilience4j.bulkhead.instances.default.max-concurrent-calls=20
resilience4j.bulkhead.instances.default.max-wait-duration=10ms
resilience4j.bulkhead.instances.product-api.max-concurrent-calls=10
resilience4j.ratelimiter.instances.default.limit-for-period=10
resilience4j.ratelimiter.instances.default.limit-refresh-period=10s
resilience4j.ratelimiter.instances.default.timeout-duration=3s
resilience4j.ratelimiter.instances.default.register-health-indicator=true
#resilience4j.retry.retryAspectOrder=2
resilience4j.retry.instances.product-api.enableExponentialBackoff=true
resilience4j.retry.instances.product-api.exponentialBackoffMultiplier=2
resilience4j.retry.instances.product-api.maxAttempts=3
resilience4j.retry.instances.product-api.waitDuration=1s
resilience4j.retry.instances.product-api.enable-exponential-backoff=true
resilience4j.retry.instances.product-api.exponential-backoff-multiplier=2
resilience4j.retry.instances.product-api.max-attempts=3
resilience4j.retry.instances.product-api.wait-duration=1s
#resilience4j.circuitbreaker.circuitBreakerAspectOrder=1
resilience4j.circuitbreaker.instances.default.registerHealthIndicator=true
resilience4j.circuitbreaker.instances.default.slidingWindowSize=5
resilience4j.circuitbreaker.instances.default.minimumNumberOfCalls=2
resilience4j.circuitbreaker.instances.default.failureRateThreshold=100
resilience4j.circuitbreaker.instances.default.permittedNumberOfCallsInHalfOpenState=2
resilience4j.circuitbreaker.instances.default.automaticTransitionFromOpenToHalfOpenEnabled=true
resilience4j.circuitbreaker.instances.getInventoryByProductCodes.registerHealthIndicator=true
resilience4j.circuitbreaker.instances.getInventoryByProductCodes.slidingWindowSize=10
resilience4j.circuitbreaker.instances.getInventoryByProductCodes.permittedNumberOfCallsInHalfOpenState=2
resilience4j.circuitbreaker.instances.getInventoryByProductCodes.automaticTransitionFromOpenToHalfOpenEnabled=true
resilience4j.timelimiter.instances.default.timeoutDuration=10s
resilience4j.timelimiter.instances.default.cancelRunningFuture=true
resilience4j.circuitbreaker.instances.default.register-health-indicator=true
resilience4j.circuitbreaker.instances.default.sliding-window-size=5
resilience4j.circuitbreaker.instances.default.minimum-number-of-calls=2
resilience4j.circuitbreaker.instances.default.failure-rate-threshold=100
resilience4j.circuitbreaker.instances.default.permitted-number-of-calls-in-half-open-state=2
resilience4j.circuitbreaker.instances.default.automatic-transition-from-open-to-half-open-enabled=true
resilience4j.circuitbreaker.instances.get-inventory-by-product-codes.register-health-indicator=true
resilience4j.circuitbreaker.instances.get-inventory-by-product-codes.sliding-window-size=10
resilience4j.circuitbreaker.instances.get-inventory-by-product-codes.permitted-number-of-calls-in-half-open-state=2
resilience4j.circuitbreaker.instances.get-inventory-by-product-codes.automatic-transition-from-open-to-half-open-enabled=true
resilience4j.timelimiter.instances.default.timeout-duration=10s
resilience4j.timelimiter.instances.default.cancel-running-future=true


## adding kafka consumer to test sending and receiving of message
Expand Down
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
eureka:
client:
serviceUrl:
defaultZone: http://localhost:8761/eureka/
service-url:
default-zone: http://localhost:8761/eureka/
instance:
preferIpAddress: true
prefer-ip-address: true

jdbc:
datasource-proxy:
Expand Down Expand Up @@ -120,9 +120,9 @@ spring:
springdoc:
swagger-ui:
#For sorting endpoints alphabetically
operationsSorter: alpha
operations-sorter: alpha
#For sorting tags alphabetically
tagsSorter: alpha
tags-sorter: alpha
---
spring:
config:
Expand All @@ -138,7 +138,7 @@ spring:
eureka:
client:
service-url:
defaultZone: http://naming-server:8761/eureka/
default-zone: http://naming-server:8761/eureka/
management:
zipkin:
tracing:
Expand Down
2 changes: 1 addition & 1 deletion inventory-service/src/main/resources/application.yml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
server:
port: 18181
servlet:
contextPath: /${spring.application.name}
context-path: /${spring.application.name}
spring:
application:
name: inventory-service
Expand Down
4 changes: 2 additions & 2 deletions order-service/src/main/resources/application-h2.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ spring:
url: jdbc:h2:file:/data/demo
username: sa
password: password
driverClassName: org.h2.Driver
driver-class-name: org.h2.Driver
jpa:
spring:
jpa:
Expand All @@ -17,4 +17,4 @@ spring:
import: optional:configserver:${CONFIG_SERVER:http://localhost:8888}/
application:
catalog-service-url: http://localhost:18080/catalog-service
byPassCircuitBreaker: true
by-pass-circuit-breaker: true
24 changes: 12 additions & 12 deletions order-service/src/main/resources/application-local.properties
Original file line number Diff line number Diff line change
Expand Up @@ -33,15 +33,15 @@ management.health.circuitbreakers.enabled=true
management.health.ratelimiters.enabled=true

# Circuitbreaker
resilience4j.circuitbreaker.configs.default.registerHealthIndicator=true
resilience4j.circuitbreaker.configs.default.slidingWindowSize= 10
resilience4j.circuitbreaker.configs.default.permittedNumberOfCallsInHalfOpenState=10
resilience4j.circuitbreaker.configs.default.waitDurationInOpenState=10000
resilience4j.circuitbreaker.configs.default.failureRateThreshold=60
resilience4j.circuitbreaker.configs.default.eventConsumerBufferSize=10
resilience4j.circuitbreaker.configs.shared.slidingWindowSize=50
resilience4j.circuitbreaker.configs.shared.permittedNumberOfCallsInHalfOpenState=2
resilience4j.circuitbreaker.instances.default.baseConfig=default
resilience4j.circuitbreaker.instances.default.failureRateThreshold=90

application.byPassCircuitBreaker=true
resilience4j.circuitbreaker.configs.default.register-health-indicator=true
resilience4j.circuitbreaker.configs.default.sliding-window-size= 10
resilience4j.circuitbreaker.configs.default.permitted-number-of-calls-in-half-open-state=10
resilience4j.circuitbreaker.configs.default.wait-duration-in-open-state=10000
resilience4j.circuitbreaker.configs.default.failure-rate-threshold=60
resilience4j.circuitbreaker.configs.default.event-consumer-buffer-size=10
resilience4j.circuitbreaker.configs.shared.sliding-window-size=50
resilience4j.circuitbreaker.configs.shared.permitted-number-of-calls-in-half-open-state=2
resilience4j.circuitbreaker.instances.default.base-config=default
resilience4j.circuitbreaker.instances.default.failure-rate-threshold=90

application.by-pass-circuit-breaker=true
6 changes: 3 additions & 3 deletions order-service/src/main/resources/application.yml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
server:
port: 18282
servlet:
contextPath: /${spring.application.name}
context-path: /${spring.application.name}
forward-headers-strategy: framework
spring:
application:
Expand All @@ -17,8 +17,8 @@ spring:
type:
headers: true
streams:
clientId: order-service-stream-client
replicationFactor: 1
client-id: order-service-stream-client
replication-factor: 1
producer:
acks: all
application-id: ${spring.application.name}
Expand Down
22 changes: 11 additions & 11 deletions order-service/src/test/resources/application-test.properties
Original file line number Diff line number Diff line change
Expand Up @@ -28,16 +28,16 @@ spring.kafka.consumer.value-deserializer=org.springframework.kafka.support.seria
spring.kafka.consumer.properties.spring.json.trusted.packages= com.example.common.dtos

#Circuitbreaker
resilience4j.circuitbreaker.configs.default.registerHealthIndicator=true
resilience4j.circuitbreaker.configs.default.slidingWindowSize= 10
resilience4j.circuitbreaker.configs.default.permittedNumberOfCallsInHalfOpenState=10
resilience4j.circuitbreaker.configs.default.waitDurationInOpenState=10000
resilience4j.circuitbreaker.configs.default.failureRateThreshold=60
resilience4j.circuitbreaker.configs.default.eventConsumerBufferSize=10
resilience4j.circuitbreaker.configs.shared.slidingWindowSize=50
resilience4j.circuitbreaker.configs.shared.permittedNumberOfCallsInHalfOpenState=2
resilience4j.circuitbreaker.instances.default.baseConfig=default
resilience4j.circuitbreaker.instances.default.failureRateThreshold=90
resilience4j.circuitbreaker.configs.default.register-health-indicator=true
resilience4j.circuitbreaker.configs.default.sliding-window-size= 10
resilience4j.circuitbreaker.configs.default.permitted-number-of-calls-in-half-open-state=10
resilience4j.circuitbreaker.configs.default.wait-duration-in-open-state=10000
resilience4j.circuitbreaker.configs.default.failure-rate-threshold=60
resilience4j.circuitbreaker.configs.default.event-consumer-buffer-size=10
resilience4j.circuitbreaker.configs.shared.sliding-window-size=50
resilience4j.circuitbreaker.configs.shared.permitted-number-of-calls-in-half-open-state=2
resilience4j.circuitbreaker.instances.default.base-config=default
resilience4j.circuitbreaker.instances.default.failure-rate-threshold=90


application.byPassCircuitBreaker=false
application.by-pass-circuit-breaker=false
2 changes: 1 addition & 1 deletion payment-service/src/main/resources/application.properties
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
spring.application.name=payment-service
server.port=18085
server.servlet.contextPath= /${spring.application.name}
server.servlet.context-path= /${spring.application.name}

######## Kafka Configuration #########
spring.kafka.consumer.auto-offset-reset=earliest
Expand Down
8 changes: 4 additions & 4 deletions service-registry/src/main/resources/application.properties
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
spring.application.name=naming-server
server.port=8761

eureka.instance.preferIpAddress=true
eureka.client.registerWithEureka=false
eureka.client.fetchRegistry=false
eureka.client.serviceUrl.defaultZone=http://localhost:${server.port}/eureka/
eureka.instance.prefer-ip-address=true
eureka.client.register-with-eureka=false
eureka.client.fetch-registry=false
eureka.client.service-url.default-zone=http://localhost:${server.port}/eureka/
eureka.server.peer-node-read-timeout-ms= 300

spring.config.import=optional:configserver:${CONFIG_SERVER:http://localhost:8888}/

0 comments on commit 84ecc49

Please sign in to comment.