generated from pagopa-archive/template-java-microservice
-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge remote-tracking branch 'origin/main' into add-toPublish-and-fix…
…-apim # Conflicts: # src/main/java/it/gov/pagopa/spontaneouspayment/service/PaymentsService.java
Showing
14 changed files
with
70 additions
and
12 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
17 changes: 17 additions & 0 deletions
17
src/main/java/it/gov/pagopa/spontaneouspayment/config/ExternalServiceConfig.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
package it.gov.pagopa.spontaneouspayment.config; | ||
|
||
import feign.RequestInterceptor; | ||
import org.springframework.beans.factory.annotation.Value; | ||
import org.springframework.context.annotation.Bean; | ||
|
||
import static it.gov.pagopa.spontaneouspayment.utils.Constants.APIM_SUBSCRIPTION_KEY; | ||
|
||
public class ExternalServiceConfig extends FeignConfig{ | ||
@Value("${authorization.external.services.subscription-key}") | ||
private String externalServicesSubscriptionKey; | ||
|
||
@Bean | ||
public RequestInterceptor subscriptionKey() { | ||
return requestTemplate -> requestTemplate.header(APIM_SUBSCRIPTION_KEY, externalServicesSubscriptionKey); | ||
} | ||
} |
19 changes: 19 additions & 0 deletions
19
src/main/java/it/gov/pagopa/spontaneouspayment/config/IuvGeneratorConfig.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,19 @@ | ||
package it.gov.pagopa.spontaneouspayment.config; | ||
|
||
import feign.RequestInterceptor; | ||
import org.springframework.beans.factory.annotation.Value; | ||
import org.springframework.context.annotation.Bean; | ||
|
||
import static it.gov.pagopa.spontaneouspayment.utils.Constants.APIM_SUBSCRIPTION_KEY; | ||
|
||
public class IuvGeneratorConfig extends FeignConfig { | ||
|
||
@Value("${authorization.iuv.generator.subscription-key}") | ||
private String iuvGeneratorSubscriptionKey; | ||
|
||
@Bean | ||
public RequestInterceptor subscriptionKey() { | ||
return requestTemplate -> requestTemplate.header(APIM_SUBSCRIPTION_KEY, iuvGeneratorSubscriptionKey); | ||
} | ||
|
||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
9 changes: 9 additions & 0 deletions
9
src/main/java/it/gov/pagopa/spontaneouspayment/utils/Constants.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
package it.gov.pagopa.spontaneouspayment.utils; | ||
|
||
import lombok.experimental.UtilityClass; | ||
|
||
@UtilityClass | ||
public class Constants { | ||
|
||
public static final String APIM_SUBSCRIPTION_KEY = "Ocp-Apim-Subscription-Key"; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters