From 84ecc4961f8b212b8ccf963f5f1e37f4ba3044bf Mon Sep 17 00:00:00 2001 From: Raja Kolli Date: Thu, 16 Nov 2023 04:53:32 +0000 Subject: [PATCH] feat: use kebab cases for properties --- .../src/main/resources/application.yml | 30 +++++------ .../resources/application-local.properties | 54 +++++++++---------- .../src/main/resources/application.properties | 6 +-- .../resources/application-test.properties | 46 ++++++++-------- .../config-repository/application.yml | 12 ++--- .../src/main/resources/application.yml | 2 +- .../src/main/resources/application-h2.yml | 4 +- .../resources/application-local.properties | 24 ++++----- .../src/main/resources/application.yml | 6 +-- .../resources/application-test.properties | 22 ++++---- .../src/main/resources/application.properties | 2 +- .../src/main/resources/application.properties | 8 +-- 12 files changed, 108 insertions(+), 108 deletions(-) diff --git a/api-gateway/src/main/resources/application.yml b/api-gateway/src/main/resources/application.yml index 9d6d65c7..768508b3 100644 --- a/api-gateway/src/main/resources/application.yml +++ b/api-gateway/src/main/resources/application.yml @@ -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/** @@ -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/** @@ -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: @@ -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: @@ -99,5 +99,5 @@ springdoc: # adding this so that List bean will trigger group-configs[0]: group: api-gateway - pathsToMatch: /** + paths-to-match: /** # packagesToScan: com.example.api.gateway.web diff --git a/catalog-service/src/main/resources/application-local.properties b/catalog-service/src/main/resources/application-local.properties index d815ca27..32db5fa3 100644 --- a/catalog-service/src/main/resources/application-local.properties +++ b/catalog-service/src/main/resources/application-local.properties @@ -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 diff --git a/catalog-service/src/main/resources/application.properties b/catalog-service/src/main/resources/application.properties index aa46a80e..3120ff38 100644 --- a/catalog-service/src/main/resources/application.properties +++ b/catalog-service/src/main/resources/application.properties @@ -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 @@ -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 diff --git a/catalog-service/src/test/resources/application-test.properties b/catalog-service/src/test/resources/application-test.properties index 40e20c3a..8e5c6585 100644 --- a/catalog-service/src/test/resources/application-test.properties +++ b/catalog-service/src/test/resources/application-test.properties @@ -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 diff --git a/config-server/src/main/resources/config-repository/application.yml b/config-server/src/main/resources/config-repository/application.yml index 88fe1e68..143e574d 100644 --- a/config-server/src/main/resources/config-repository/application.yml +++ b/config-server/src/main/resources/config-repository/application.yml @@ -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: @@ -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: @@ -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: diff --git a/inventory-service/src/main/resources/application.yml b/inventory-service/src/main/resources/application.yml index ece4fae4..20792d17 100644 --- a/inventory-service/src/main/resources/application.yml +++ b/inventory-service/src/main/resources/application.yml @@ -1,7 +1,7 @@ server: port: 18181 servlet: - contextPath: /${spring.application.name} + context-path: /${spring.application.name} spring: application: name: inventory-service diff --git a/order-service/src/main/resources/application-h2.yml b/order-service/src/main/resources/application-h2.yml index 804334bf..6cfb65f9 100644 --- a/order-service/src/main/resources/application-h2.yml +++ b/order-service/src/main/resources/application-h2.yml @@ -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: @@ -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 diff --git a/order-service/src/main/resources/application-local.properties b/order-service/src/main/resources/application-local.properties index 1736f159..a5315b56 100644 --- a/order-service/src/main/resources/application-local.properties +++ b/order-service/src/main/resources/application-local.properties @@ -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 diff --git a/order-service/src/main/resources/application.yml b/order-service/src/main/resources/application.yml index a6c40e3c..9bc015ab 100644 --- a/order-service/src/main/resources/application.yml +++ b/order-service/src/main/resources/application.yml @@ -1,7 +1,7 @@ server: port: 18282 servlet: - contextPath: /${spring.application.name} + context-path: /${spring.application.name} forward-headers-strategy: framework spring: application: @@ -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} diff --git a/order-service/src/test/resources/application-test.properties b/order-service/src/test/resources/application-test.properties index 29c0aec8..3360da04 100644 --- a/order-service/src/test/resources/application-test.properties +++ b/order-service/src/test/resources/application-test.properties @@ -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 \ No newline at end of file +application.by-pass-circuit-breaker=false \ No newline at end of file diff --git a/payment-service/src/main/resources/application.properties b/payment-service/src/main/resources/application.properties index 9a0b7de1..65de0164 100644 --- a/payment-service/src/main/resources/application.properties +++ b/payment-service/src/main/resources/application.properties @@ -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 diff --git a/service-registry/src/main/resources/application.properties b/service-registry/src/main/resources/application.properties index 82fc9c74..4e5e0cec 100644 --- a/service-registry/src/main/resources/application.properties +++ b/service-registry/src/main/resources/application.properties @@ -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}/