diff --git a/src/main/java/it/gov/pagopa/spontaneouspayment/entity/ServiceRef.java b/src/main/java/it/gov/pagopa/spontaneouspayment/entity/ServiceRef.java index 5b0e0df..31f41cc 100644 --- a/src/main/java/it/gov/pagopa/spontaneouspayment/entity/ServiceRef.java +++ b/src/main/java/it/gov/pagopa/spontaneouspayment/entity/ServiceRef.java @@ -22,7 +22,7 @@ public class ServiceRef { @NotBlank(message = "iban is required") private String iban; - @NotBlank + @NotBlank(message = "segregation code is required") private String segregationCode; private String postalIban; diff --git a/src/main/java/it/gov/pagopa/spontaneouspayment/service/GpdClient.java b/src/main/java/it/gov/pagopa/spontaneouspayment/service/GpdClient.java index fa43edc..233556f 100644 --- a/src/main/java/it/gov/pagopa/spontaneouspayment/service/GpdClient.java +++ b/src/main/java/it/gov/pagopa/spontaneouspayment/service/GpdClient.java @@ -14,8 +14,8 @@ @FeignClient(value = "gpd", url = "${service.gpd.host}", configuration = FeignConfig.class) public interface GpdClient { - @Retryable(exclude = FeignException.FeignClientException.class, maxAttemptsExpression = "${retry.maxAttempts}", - backoff = @Backoff(delayExpression = "${retry.maxDelay}")) + @Retryable(exclude = FeignException.FeignClientException.class, maxAttemptsExpression = "${retry.gpd.maxAttempts}", + backoff = @Backoff(delayExpression = "${retry.gpd.maxDelay}")) @GetMapping(value = "/organizations/{organizationfiscalcode}/debtpositions") PaymentPositionModel createDebtPosition(@PathVariable("organizationfiscalcode") String organizationFiscalCode, @RequestBody PaymentPositionModel paymentPositionModel); diff --git a/src/main/java/it/gov/pagopa/spontaneouspayment/service/IuvGeneratorClient.java b/src/main/java/it/gov/pagopa/spontaneouspayment/service/IuvGeneratorClient.java index b11b638..3ad2f67 100644 --- a/src/main/java/it/gov/pagopa/spontaneouspayment/service/IuvGeneratorClient.java +++ b/src/main/java/it/gov/pagopa/spontaneouspayment/service/IuvGeneratorClient.java @@ -16,8 +16,8 @@ @FeignClient(value = "iuvgenerator", url = "${service.iuv.generator.host}", configuration = FeignConfig.class) public interface IuvGeneratorClient { - @Retryable(exclude = FeignException.FeignClientException.class, maxAttemptsExpression = "${retry.iuv.generator.maxAttempts}", - backoff = @Backoff(delayExpression = "${retry.iuv.generator.maxDelay}")) + @Retryable(exclude = FeignException.FeignClientException.class, maxAttemptsExpression = "${retry.iuv-generator.maxAttempts}", + backoff = @Backoff(delayExpression = "${retry.iuv-generator.maxDelay}")) @GetMapping(value = "/organizations/{organizationfiscalcode}/iuv") IuvGenerationModelResponse generateIUV(@PathVariable("organizationfiscalcode") String organizationFiscalCode, @RequestBody IuvGenerationModel paymentPositionModel); diff --git a/src/main/resources/application-dev.properties b/src/main/resources/application-dev.properties index 2591208..f5edabf 100644 --- a/src/main/resources/application-dev.properties +++ b/src/main/resources/application-dev.properties @@ -15,16 +15,12 @@ service.aux.digit=3 feign.client.config.default.connect-timeout=1000 feign.client.config.default.read-timeout=1000 -<<<<<<< HEAD # Retry configuration -======= -# retry configuration ->>>>>>> branch 'PPD-238-call-iuv-generator' of https://github.com/pagopa/pagopa-spontaneous-payments retry.gpd.maxAttempts=1 retry.gpd.maxDelay=200 -retry.iuv.generator.maxAttempts=1 -retry.iuv.generator.maxDelay=200 +retry.iuv-generator.maxAttempts=1 +retry.iuv-generator.maxDelay=200 # logging level settings logging.level.root=INFO -logging.level.it.gov.pagopa.spontaneouspayment=INFO \ No newline at end of file +logging.level.it.gov.pagopa.spontaneouspayment=INFO diff --git a/src/main/resources/application-local.properties b/src/main/resources/application-local.properties index 1e93ff2..ed1feab 100644 --- a/src/main/resources/application-local.properties +++ b/src/main/resources/application-local.properties @@ -21,9 +21,9 @@ feign.client.config.default.read-timeout=1000 # Retry configuration retry.gpd.maxAttempts=1 retry.gpd.maxDelay=200 -retry.iuv.generator.maxAttempts=1 -retry.iuv.generator.maxDelay=200 +retry.iuv-generator.maxAttempts=1 +retry.iuv-generator.maxDelay=200 # Logging Level settings logging.level.root=INFO -logging.level.it.gov.pagopa.spontaneouspayment=INFO \ No newline at end of file +logging.level.it.gov.pagopa.spontaneouspayment=INFO diff --git a/src/main/resources/application.properties b/src/main/resources/application.properties index 3e9cdb8..ca8c7a8 100644 --- a/src/main/resources/application.properties +++ b/src/main/resources/application.properties @@ -25,8 +25,8 @@ feign.client.config.default.read-timeout=${CONNECTION_TIMEOUT} # Retry configuration retry.gpd.maxAttempts=${RETRY_GPD_MAX_ATTEMPTS} retry.gpd.maxDelay=${RETRY_GPD_MAX_DELAY} -retry.iuv.generator.maxAttempts=${RETRY_IUV_GENERATOR_MAX_ATTEMPTS} -retry.iuv.generator.maxDelay=${RETRY_IUV_GENERATOR_MAX_DELAY} +retry.iuv-generator.maxAttempts=${RETRY_IUV_GENERATOR_MAX_ATTEMPTS} +retry.iuv-generator.maxDelay=${RETRY_IUV_GENERATOR_MAX_DELAY} # Logging Level settings logging.level.root=${LOGGING_LEVEL} diff --git a/src/test/resources/application.properties b/src/test/resources/application.properties index 74ddacc..2884334 100644 --- a/src/test/resources/application.properties +++ b/src/test/resources/application.properties @@ -22,9 +22,19 @@ feign.client.config.default.connect-timeout=1000 feign.client.config.default.read-timeout=1000 # retry configuration -retry.maxAttempts=1 -retry.maxDelay=200 +retry.gpd.maxAttempts=1 +retry.gpd.maxDelay=200 +retry.iuv-generator.maxAttempts=1 +retry.iuv-generator.maxDelay=200 # logging level settings logging.level.root=INFO logging.level.it.gov.pagopa.spontaneouspayment=INFO + +# Actuator +management.endpoints.web.exposure.include=health,info +management.endpoints.jmx.exposure.include=health,info +management.info.env.enabled=true +management.endpoint.health.probes.enabled=true +management.health.livenessState.enabled=true +management.health.readinessState.enabled=true