Skip to main content

Install and adopt

The Spring Boot starter turns application beans into remotely operated Synapsys processes. It discovers them, manages their lifecycle, sends heartbeats, and captures per-run console output without adding a controller or inbound port.

Requirements: Java 17 or later, Spring Boot 3.x, a reachable Core, and a worker token.

Install from Maven Central​

Maven needs no additional repository:

pom.xml
<dependency>
<groupId>org.basamento.synapsys</groupId>
<artifactId>synapsys-spring-boot-starter</artifactId>
<version>0.2.0</version>
</dependency>

Gradle:

build.gradle
implementation 'org.basamento.synapsys:synapsys-spring-boot-starter:0.2.0'

Before and after​

Suppose an application starts a poller itself:

Before: InvoicePoller.java
@Component
public class InvoicePoller {
@Scheduled(fixedDelay = 30_000)
public void poll() {
invoiceService.importNewInvoices();
}
}

With Synapsys, the business call stays where it is. The process runs only after an operator starts it and cooperates when asked to stop:

After: InvoicePoller.java
@SynapsysProcess(name = "invoice-poller")
public class InvoicePoller extends AbstractEndlessProcess {
private final InvoiceService invoiceService;

public InvoicePoller(InvoiceService invoiceService) {
this.invoiceService = invoiceService;
}

@Override
protected void runForever(StopSignal stopSignal) throws Exception {
while (!stopSignal.isStopRequested()) {
invoiceService.importNewInvoices();
Thread.sleep(30_000);
}
}
}

@SynapsysProcess is a Spring stereotype, so component scanning finds it. Omit name to use the bean name, but an explicit stable name is easier to recognise in the console.

Minimum configuration​

application.yaml
spring:
application:
name: billing-api

synapsys:
core-url: ${SYNAPSYS_CORE_URL}
core-token: ${SYNAPSYS_CORE_TOKEN}
runtime environment
SYNAPSYS_CORE_URL=https://core.example.com
SYNAPSYS_CORE_TOKEN=syn_replace_with_your_token

The starter auto-configures itself and starts with the application. The worker should appear in Core within five seconds.

Next: configure environments and failure behaviour.

Version 0.2.0 is available from Maven Central. See the starter source, the Maven example, the Gradle example, and the publication matrix.