The Java/Kotlin SDK provides an integration module with Spring Boot: your Restate services become Spring beans, so you can use dependency injection, configuration properties, and the rest of the Spring ecosystem.
Get started from a template with the Java (Maven + Spring Boot) or Kotlin (Gradle + Spring Boot) Quickstart.

Dependencies

Use the Spring Boot starter instead of the plain HTTP SDK dependency. It pulls in the SDK and auto-configures the Restate endpoint and client.
Restate Java/Kotlin SDK 2.9.2 and later requires Netty 4.1.132 or later. Spring Boot dependency management can select an older Netty version and cause runtime errors.Upgrade to Spring Boot 3.5.13 or later, or set netty.version to 4.1.132.Final or later in your Maven properties or Gradle properties. Use Restate Java/Kotlin SDK 2.9.3 or later with Spring AI 2.x to avoid incompatible victools dependencies.

Enabling Restate

Add @EnableRestate to your Spring Boot application:

Defining services

Annotate your service class with @RestateComponent in addition to the usual @Service, @VirtualObject, or @Workflow annotation. Unlike the standalone setup, the service has no main: Spring Boot binds and serves it. @RestateComponent is like any other Spring’s @Component: inject configuration and other beans as usual (@Value, constructor injection, …).
Everything inside the handler works exactly as in the standalone SDK: use the Restate static methods (Java) or the top-level functions in dev.restate.sdk.kotlin (Kotlin) for state, calls, side effects, and timers.

Calling Restate from Spring

The starter registers a Client bean. Inject it into any Spring component (controllers, scheduled tasks, …) to invoke your handlers from outside a Restate context:
In Kotlin, inject the same Client bean through the constructor.

Configuration

Configure the SDK endpoint and the injected client via application.properties (or application.yml):
Service- and handler-level options (retention, timeouts, retry policies, …) are set with restate.components.<ServiceName>.* properties. See service configuration for the full list.