A Spring Boot starter project for connect-sdk-java.
For more details, see https://robtimus.github.io/connect-sdk-java-spring-boot-starter/.
First, add this Spring Boot starter as a dependency to your project.
Next, add the following properties to your application.properties
or application.yml
file:
connect.api.endpoint.host=<API endpoint hostname>
connect.api.integrator=<your company name>
connect.api.authorization-id=<your authorization id>
connect.api.authorization-secret=<your authorization secret>
With these simple steps a Client and a V1Client will be auto-configured.
To also have a MerchantClient auto-configured, add the following property as well:
connect.api.merchant-id=<your merchand id>
If you have the org.springframework.boot:spring-boot-starter-actuator
dependency in your project and have provided all of the above properties, including connect.api.merchant-id
, then a health indicator will be auto-configured. This will use the test connection functionality to check your connectivity to the Worldline Connect Server API.
To prevent too many requests to the Worldline Connect Server API this is throttled to at most 1 request every minute. This can be changed by adding the following property to your project:
# Every 5 minutes
connect.api.health.min-interval=300
If you want to have an auto-configured MerchantClient
but you don't want this health indicator, you can disable it by adding the following property to your project:
management.health.connect-sdk.enabled=false