Basic Project Setup
A minimal adapter is a standard Spring Boot project that depends on the Adapter SDK.
The Getting Started project
follows the layout below and is the recommended starting point.
build.gradle
The important parts are the spring-boot plugin, the adapter-sdk dependency, and the
PDX repository the SDK is served from. Access to that repository uses the accessKey
and secretKey you received from PDX — see Get access to SDK for
how these are supplied via sdk-credentials.gradle.
plugins {
id 'java'
id 'org.springframework.boot' version '2.7.0'
id 'io.freefair.lombok' version '6.5.1'
}
group 'sdk.getting.started'
version '1.0-SNAPSHOT'
apply from: 'sdk-credentials.gradle'
repositories {
mavenCentral()
maven {
name "PDX"
url "s3://com.stibo.pdx.repo.public/release"
credentials(AwsCredentials) {
accessKey = rootProject.ext.accessKey
secretKey = rootProject.ext.secretKey
}
}
}
apply plugin: 'io.spring.dependency-management'
dependencies {
implementation 'org.springframework.boot:spring-boot-starter'
implementation 'com.stibo.leap:leap-datastandard-extractor:3.0.11'
implementation 'com.stibo.leap:adapter-sdk:1.0.7'
testImplementation 'org.junit.jupiter:junit-jupiter-api:5.8.1'
testRuntimeOnly 'org.junit.jupiter:junit-jupiter-engine:5.8.1'
}
test {
useJUnitPlatform()
}application.yml
The SDK ships sensible defaults in adapter-sdk.properties, so the only configuration
you must provide is the gateway URL and your API token:
pdx.api:
url: https://pdx-preprod.stibosystems.com/api/v1/adapter-gateway
token: place your API-token hereYourChannelAdapter.java
The main class only needs the @AdapterApplication annotation, which pulls in the full
SDK configuration (component scan, Feign clients, scheduling, service discovery). No
additional configuration is required to run the adapter.
package sdk.getting.started.adapter;
import com.stibo.leap.adapter.AdapterApplication;
import org.springframework.boot.SpringApplication;
@AdapterApplication
public class YourChannelAdapter {
public static void main(String[] args) {
SpringApplication.run(YourChannelAdapter.class, args);
}
}Once these files are in place the project compiles, but the adapter will not start until
you provide the beans the SDK requires — see List of Required Beans
and Building The Adapter.
Updated 11 days ago
