Run Restate services inside a Spring Boot application with dependency injection.
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.
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.
Annotate your service class with @RestateComponentin 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, …).
@RestateComponent@Servicepublic class Greeter { @Value("${greetingPrefix}") private String greetingPrefix; public record Greeting(String name) {} public record GreetingResponse(String message) {} @Handler public GreetingResponse greet(Greeting req) { // Durably execute a set of steps; resilient against failures String greetingId = Restate.random().nextUUID().toString(); Restate.run("Notification", () -> sendNotification(greetingId, req.name)); Restate.sleep(Duration.ofSeconds(1)); Restate.run("Reminder", () -> sendReminder(greetingId, req.name)); // Respond to caller return new GreetingResponse("You said " + greetingPrefix + " to " + req.name + "!"); }}
@RestateComponent@Serviceclass Greeter { @Value("\${greetingPrefix}") lateinit var greetingPrefix: String @Serializable data class Greeting(val name: String) @Serializable data class GreetingResponse(val message: String) @Handler suspend fun greet(req: Greeting): GreetingResponse { // Durably execute a set of steps; resilient against failures val greetingId = random().nextUUID().toString() runBlock("Notification") { sendNotification(greetingId, req.name) } sleep(1.seconds) runBlock("Reminder") { sendReminder(greetingId, req.name) } // Respond to caller return GreetingResponse("You said $greetingPrefix to ${req.name}!") }}
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.
The starter registers a Client bean. Inject it into any Spring component (controllers, scheduled tasks, …) to invoke your handlers from outside a Restate context:
package com.example.restatestarter;import com.example.restatestarter.Greeter.Greeting;import dev.restate.client.Client;import org.springframework.web.bind.annotation.GetMapping;import org.springframework.web.bind.annotation.RestController;@RestControllerpublic class HelloController { private final Client restateClient; public HelloController(Client restateClient) { this.restateClient = restateClient; } @GetMapping("/") public String index() { return restateClient.service(Greeter.class).greet(new Greeting("Alice")) + " from Spring Boot!"; }}
In Kotlin, inject the same Client bean through the constructor.
Configure the SDK endpoint and the injected client via application.properties (or application.yml):
# Port where the Restate SDK endpoint is exposed (default 9080)restate.sdk.http.port=9080# Base URI of the Restate ingress, used by the injected Clientrestate.client.base-uri=http://localhost:8080
Service- and handler-level options (retention, timeouts, retry policies, …) are set with restate.components.<ServiceName>.* properties. See service configuration for the full list.
{"docsConfig":{"theme":"mint","$schema":"https://mintlify.com/docs.json","name":"Restate","description":"Restate is the simplest way to build resilient applications.","colors":{"primary":"#4752c4","light":"#7a87e1","dark":"#4752c4"},"logo":{"light":"https://mintcdn.com/restate-6d46e1dc/0MkLgffDAGHkNDIZ/logo/light.svg?fit=max\u0026auto=format\u0026n=0MkLgffDAGHkNDIZ\u0026q=85\u0026s=70e648c2608af2d2c33dc26b3bce13d3","dark":"https://mintcdn.com/restate-6d46e1dc/0MkLgffDAGHkNDIZ/logo/dark.svg?fit=max\u0026auto=format\u0026n=0MkLgffDAGHkNDIZ\u0026q=85\u0026s=5be48044922541993e0e472f203bca46","href":"https://restate.dev"},"favicon":"https://mintcdn.com/restate-6d46e1dc/en_t8BH_S2cXTlbv/favicon.svg?fit=max\u0026auto=format\u0026n=en_t8BH_S2cXTlbv\u0026q=85\u0026s=d282cb3c3124106eca71fa9e9121043f","api":{"playground":{"display":"simple"}},"appearance":{"default":"light","strict":true},"background":{"decoration":"gradient"},"navbar":{"links":[{"icon":"discord","href":"https://discord.restate.dev","label":""},{"icon":"slack","href":"https://slack.restate.dev","label":""},{"icon":"github","href":"https://github.com/restatedev/restate","label":""}]},"footer":{"socials":{"website":"https://restate.dev","github":"https://github.com/restatedev/restate","discord":"https://discord.restate.dev","slack":"https://slack.restate.dev","youtube":"https://www.youtube.com/@restatedev","linkedin":"https://linkedin.com/company/restatedev","x":"https://x.com/restatedev","bluesky":"https://bsky.app/profile/restate.dev"}},"fonts":{"heading":{"family":"Rubik"},"body":{"family":"Manrope"}},"integrations":{"gtm":{"tagId":"GTM-TKTFM2CK"},"cookies":{"key":"restate_cookie_consent","value":"granted"}},"contextual":{"options":["chatgpt","claude","copy"],"display":"header"},"styling":{"latex":false},"navigation":{"pages":[]}},"deployment":{"deploymentMetadataValue":{"subdomain":"restate-6d46e1dc","hasAudioNarration":false,"actualSubdomain":"restate-6d46e1dc","customDomains":["docs.restate.dev"],"gitSource":{"type":"github","owner":"restatedev","repo":"docs-restate","deployBranch":"main","contentDirectory":"docs","isPrivate":true,"mountPath":"","label":""},"chroma":{"liveDeploymentHistoryId":"6ae45a2c4ebd7542833d5ef8","collectionId":"9a64bf61-919c-4698-b4b1-d7e4abd74636","schemaVersion":"v3","latestBuiltDeploymentHistoryId":"6ae45a2c4ebd7542833d5ef8"},"feedback":{"thumbs":true,"agentFeedback":true},"entitlements":{"AI_CHAT":{"status":"ENABLED"},"WEB_MCP":{"status":"ENABLED"},"NARRATION":{"status":"ENABLED"}},"buildId":"6ae45a2c4ebd7542833d5ef8","clientVersion":"0.0.4044","searchFilterCounts":[{"language":"default","tag":"Docs","count":150},{"language":"default","tag":"SDKs","count":55},{"language":"default","tag":"References","count":50},{"language":"default","tag":"APIs","count":39},{"language":"default","tag":"AI / Agents","count":34},{"language":"default","tag":"Admin API","count":34},{"language":"default","tag":"Restate Cloud / BYOC / OSS","count":22},{"language":"default","tag":"Services","count":21},{"language":"default","tag":"Self-hosted Restate","count":17},{"language":"default","tag":"Learn","count":16}]},"assistantConfig":{"enableAskAiButton":true,"enableAskAiSearchBar":false,"deflection":{"enabled":false,"email":"[email protected]"}},"basePath":"","hasChatPermissions":true,"hasWebMcpPermissions":true,"toggles":[{"name":"kill-isr","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"agent-mintlify-slack","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"agent-integrations-settings","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"automations-pr-grouping","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"custom-prefix","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"analytics-v7","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"user-flows-analytics","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"no-publish-flow","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"workos-onboarding","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"llms-txt-v2","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"snapshot-serving-live","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"stripTemperatureMiddleware","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"support-platform-pylon-zendesk","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"snapshot-serving","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"instant-rollback","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"granular-notifications-server","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"granular-notifications","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"automations-fable","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"fixed-ai-action-pricing","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"automation-resolve-merge-conflict","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"scoped-publishing","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"mintql","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"page-level-analytics","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"editor-version-history-v2","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"billing-page-v2","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"full-page-search","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"workspace-projects","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"assistant-v5","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"byok-sep-25","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"fork-pr-previews","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"revalidation-jwt","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"vite-origin","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"billing-updated-9-15","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"workos-sso-scim","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"hobby-abuse-scan","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"dashboard-inbox","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"workos-signup","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"turbopuffer-dual-write","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"workos-enabled","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"approve-review-flow","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"sso-setup-deadline-banner","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false}],"privacy":{"consentBanner":{"enabled":false}},"googleFontsInlined":true},"customCss":[{"filePath":"styles.css","content":"@font-face{font-family:'Rubik';src:url(https://fonts.gstatic.com/s/rubik/v28/iJWKBXyIfDnIV7nBrXw.woff2);font-weight:400;font-style:normal;font-display:swap}h1,h2,h3{font-family:'Rubik';letter-spacing:normal!important}.hidden-tabs .tabs-list,.hidden-tabs [data-component-part=tabs-list]{display:none!important}[data-component-part=tabs-list]{flex-wrap:wrap!important;row-gap:.25rem}[data-component-part=tab-button][data-active=true] .tab-icon[src=\"/img/cloud-providers/aws-lambda.svg\"],li[data-active-nav-item=true] img[src=\"/img/cloud-providers/aws-lambda.svg\"]{content:url(/img/cloud-providers/aws-lambda-primary.svg)}[data-component-part=tab-button][data-active=true] .tab-icon[src=\"/img/cloud-providers/cloudflare-workers.svg\"],li[data-active-nav-item=true] img[src=\"/img/cloud-providers/cloudflare-workers.svg\"]{content:url(/img/cloud-providers/cloudflare-workers-primary.svg)}[data-component-part=tab-button][data-active=true] .tab-icon[src=\"/img/cloud-providers/docker.svg\"],li[data-active-nav-item=true] img[src=\"/img/cloud-providers/docker.svg\"]{content:url(/img/cloud-providers/docker-primary.svg)}[data-component-part=tab-button][data-active=true] .tab-icon[src=\"/img/cloud-providers/google-cloud-run.svg\"],li[data-active-nav-item=true] img[src=\"/img/cloud-providers/google-cloud-run.svg\"]{content:url(/img/cloud-providers/google-cloud-run-primary.svg)}[data-component-part=tab-button][data-active=true] .tab-icon[src=\"/img/cloud-providers/kubernetes.svg\"],li[data-active-nav-item=true] img[src=\"/img/cloud-providers/kubernetes.svg\"]{content:url(/img/cloud-providers/kubernetes-primary.svg)}[data-component-part=tab-button][data-active=true] .tab-icon[src=\"/img/cloud-providers/other-serverless.svg\"],li[data-active-nav-item=true] img[src=\"/img/cloud-providers/other-serverless.svg\"]{content:url(/img/cloud-providers/other-serverless-primary.svg)}[data-component-part=tab-button][data-active=true] .tab-icon[src=\"/img/cloud-providers/vercel.svg\"],li[data-active-nav-item=true] img[src=\"/img/cloud-providers/vercel.svg\"]{content:url(/img/cloud-providers/vercel-primary.svg)}[data-component-part=tab-button][data-active=true] .tab-icon[src=\"/img/languages/go.svg\"],li[data-active-nav-item=true] img[src=\"/img/languages/go.svg\"]{content:url(/img/languages/go-primary.svg)}[data-component-part=tab-button][data-active=true] .tab-icon[src=\"/img/languages/java.svg\"],li[data-active-nav-item=true] img[src=\"/img/languages/java.svg\"]{content:url(/img/languages/java-primary.svg)}[data-component-part=tab-button][data-active=true] .tab-icon[src=\"/img/languages/kotlin.svg\"],li[data-active-nav-item=true] img[src=\"/img/languages/kotlin.svg\"]{content:url(/img/languages/kotlin-primary.svg)}[data-component-part=tab-button][data-active=true] .tab-icon[src=\"/img/languages/python.svg\"],li[data-active-nav-item=true] img[src=\"/img/languages/python.svg\"]{content:url(/img/languages/python-primary.svg)}[data-component-part=tab-button][data-active=true] .tab-icon[src=\"/img/languages/ruby.svg\"],li[data-active-nav-item=true] img[src=\"/img/languages/ruby.svg\"]{content:url(/img/languages/ruby-primary.svg)}[data-component-part=tab-button][data-active=true] .tab-icon[src=\"/img/languages/rust.svg\"],li[data-active-nav-item=true] img[src=\"/img/languages/rust.svg\"]{content:url(/img/languages/rust-primary.svg)}[data-component-part=tab-button][data-active=true] .tab-icon[src=\"/img/languages/typescript.svg\"],li[data-active-nav-item=true] img[src=\"/img/languages/typescript.svg\"]{content:url(/img/languages/typescript-primary.svg)}[data-component-part=tab-button][data-active=true] .tab-icon[src=\"/logo/restate-cloud-mini.svg\"],li[data-active-nav-item=true] img[src=\"/logo/restate-cloud-mini.svg\"]{content:url(/logo/restate-cloud-mini-primary.svg)}[data-component-part=tab-button][data-active=true] .tab-icon[src=\"/logo/restate-mini.svg\"],li[data-active-nav-item=true] img[src=\"/logo/restate-mini.svg\"]{content:url(/logo/restate-mini-primary.svg)}#cc-main{--cc-btn-border-radius:0.75rem;--cc-btn-primary-bg:#2563eb;--cc-btn-primary-color:#fff;--cc-btn-primary-border-color:transparent;--cc-btn-primary-hover-bg:#1d4ed8;--cc-btn-secondary-bg:#fff;--cc-btn-secondary-color:#14151a;--cc-btn-secondary-border-color:#dee0e3;--cc-btn-secondary-hover-bg:#f3f4f6}"}],"page":{"pagePath":"develop/java/spring-boot","slug":"/develop/java/spring-boot","pageMetadata":{"title":"Spring Boot","description":"Run Restate services inside a Spring Boot application with dependency injection.","icon":"leaf","href":"/develop/java/spring-boot"},"description":{"compiledSource":"\"use strict\";\nconst {jsx: _jsx} = arguments[0];\nconst {useMDXComponents: _provideComponents} = arguments[0];\nfunction _createMdxContent(props) {\n const _components = {\n p: \"p\",\n ..._provideComponents(),\n ...props.components\n };\n return _jsx(_components.p, {\n children: \"Run Restate services inside a Spring Boot application with dependency injection.\"\n });\n}\nfunction MDXContent(props = {}) {\n const {wrapper: MDXLayout} = {\n ..._provideComponents(),\n ...props.components\n };\n return MDXLayout ? _jsx(MDXLayout, {\n ...props,\n children: _jsx(_createMdxContent, {\n ...props\n })\n }) : _createMdxContent(props);\n}\nreturn {\n default: MDXContent\n};\n","frontmatter":{},"scope":{}},"pageType":"default","mdx":{"mdxSource":{"compiledSource":"\"use strict\";const{Fragment:_Fragment,jsx:_jsx,jsxs:_jsxs}=arguments[0];const{useMDXComponents:_provideComponents}=arguments[0];function _createMdxContent(props){const _components={a:`a`,code:`code`,p:`p`,pre:`pre`,span:`span`,strong:`strong`,..._provideComponents(),...props.components},{CodeBlock,CodeGroup,Heading,Tip,Warning}=_components;if(!CodeBlock)_missingMdxReference(`CodeBlock`,true);if(!CodeGroup)_missingMdxReference(`CodeGroup`,true);if(!Heading)_missingMdxReference(`Heading`,true);if(!Tip)_missingMdxReference(`Tip`,true);if(!Warning)_missingMdxReference(`Warning`,true);return _jsxs(_Fragment,{children:[_jsx(_components.p,{children:`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.`}),`\n`,_jsx(Tip,{children:_jsxs(_components.p,{children:[`Get started from a template with the `,_jsx(_components.a,{href:`/quickstart#java`,children:`Java`}),` (Maven + Spring Boot) or `,_jsx(_components.a,{href:`/quickstart#kotlin`,children:`Kotlin`}),` (Gradle + Spring Boot) Quickstart.`]})}),`\n`,_jsx(Heading,{level:`2`,id:`dependencies`,children:`Dependencies`}),`\n`,_jsx(_components.p,{children:`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.`}),`\n`,_jsxs(Warning,{title:`Spring Boot dependency compatibility`,children:[_jsx(_components.p,{children:`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.`}),_jsxs(_components.p,{children:[`Upgrade to Spring Boot 3.5.13 or later, or set `,_jsx(_components.code,{children:`netty.version`}),` to `,_jsx(_components.code,{children:`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 `,_jsx(_components.code,{children:`victools`}),` dependencies.`]})]}),`\n`,_jsxs(CodeGroup,{children:[_jsx(CodeBlock,{filename:`Java/Maven`,numberOfLines:`10`,language:`xml`,children:_jsx(_components.pre,{className:`shiki shiki-themes github-light-default dark-plus`,style:{backgroundColor:`#ffffff`,\"--shiki-dark-bg\":`#0B0C0E`,color:`#1f2328`,\"--shiki-dark\":`#D4D4D4`},language:`xml`,children:_jsxs(_components.code,{language:`xml`,numberOfLines:`10`,children:[_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#808080`},children:`\u003c`}),_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#569CD6`},children:`properties`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#808080`},children:`>`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#808080`},children:` \u003c`}),_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#569CD6`},children:`restate.version`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#808080`},children:`>`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`2.9.3`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#808080`},children:`\u003c/`}),_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#569CD6`},children:`restate.version`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#808080`},children:`>`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#808080`},children:`\u003c/`}),_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#569CD6`},children:`properties`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#808080`},children:`>`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#808080`},children:`\u003c`}),_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#569CD6`},children:`dependencies`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#808080`},children:`>`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#808080`},children:` \u003c`}),_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#569CD6`},children:`dependency`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#808080`},children:`>`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#808080`},children:` \u003c`}),_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#569CD6`},children:`groupId`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#808080`},children:`>`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`dev.restate`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#808080`},children:`\u003c/`}),_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#569CD6`},children:`groupId`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#808080`},children:`>`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#808080`},children:` \u003c`}),_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#569CD6`},children:`artifactId`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#808080`},children:`>`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`sdk-spring-boot-starter`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#808080`},children:`\u003c/`}),_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#569CD6`},children:`artifactId`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#808080`},children:`>`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#808080`},children:` \u003c`}),_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#569CD6`},children:`version`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#808080`},children:`>`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:\"${restate.version}\"}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#808080`},children:`\u003c/`}),_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#569CD6`},children:`version`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#808080`},children:`>`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#808080`},children:` \u003c/`}),_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#569CD6`},children:`dependency`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#808080`},children:`>`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#808080`},children:`\u003c/`}),_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#569CD6`},children:`dependencies`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#808080`},children:`>`})]}),`\n`]})})}),_jsx(CodeBlock,{filename:`Kotlin/Gradle`,numberOfLines:`1`,language:`kotlin`,children:_jsx(_components.pre,{className:`shiki shiki-themes github-light-default dark-plus`,style:{backgroundColor:`#ffffff`,\"--shiki-dark-bg\":`#0B0C0E`,color:`#1f2328`,\"--shiki-dark\":`#D4D4D4`},language:`kotlin`,children:_jsxs(_components.code,{language:`kotlin`,numberOfLines:`1`,children:[_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#8250DF`,\"--shiki-dark\":`#DCDCAA`},children:`implementation`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`(`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"dev.restate:sdk-spring-boot-kotlin-starter:2.9.3\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`)`})]}),`\n`]})})})]}),`\n`,_jsx(Heading,{level:`2`,id:`enabling-restate`,children:`Enabling Restate`}),`\n`,_jsxs(_components.p,{children:[`Add `,_jsx(_components.a,{href:`https://docs.restate.dev/javadocs/dev/restate/sdk/springboot/EnableRestate.html`,children:_jsx(_components.code,{children:`@EnableRestate`})}),` to your Spring Boot application:`]}),`\n`,_jsxs(CodeGroup,{children:[_jsx(CodeBlock,{filename:`Java`,numberOfLines:`15`,language:`java`,children:_jsx(_components.pre,{className:`shiki shiki-themes github-light-default dark-plus`,style:{backgroundColor:`#ffffff`,\"--shiki-dark-bg\":`#0B0C0E`,color:`#1f2328`,\"--shiki-dark\":`#D4D4D4`},language:`java`,children:_jsxs(_components.code,{language:`java`,numberOfLines:`15`,children:[_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#569CD6`},children:`package`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` com.example.restatestarter;`})]}),`\n`,_jsx(_components.span,{className:`line`}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#569CD6`},children:`import`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` dev.restate.sdk.springboot.EnableRestate;`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#569CD6`},children:`import`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` org.springframework.boot.SpringApplication;`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#569CD6`},children:`import`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` org.springframework.boot.autoconfigure.SpringBootApplication;`})]}),`\n`,_jsx(_components.span,{className:`line`}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`@`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#4EC9B0`},children:`SpringBootApplication`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`@`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#4EC9B0`},children:`EnableRestate`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#569CD6`},children:`public`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#569CD6`},children:` class`}),_jsx(_components.span,{style:{color:`#953800`,\"--shiki-dark\":`#4EC9B0`},children:` RestateStarterApplication`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` {`})]}),`\n`,_jsx(_components.span,{className:`line`}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#569CD6`},children:`\tpublic`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#569CD6`},children:` static`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#4EC9B0`},children:` void`}),_jsx(_components.span,{style:{color:`#8250DF`,\"--shiki-dark\":`#DCDCAA`},children:` main`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`(`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#4EC9B0`},children:`String`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`[] `}),_jsx(_components.span,{style:{color:`#953800`,\"--shiki-dark\":`#9CDCFE`},children:`args`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`) {`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`\t\tSpringApplication`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`.`}),_jsx(_components.span,{style:{color:`#8250DF`,\"--shiki-dark\":`#DCDCAA`},children:`run`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`(`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`RestateStarterApplication`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`.`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`class`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`, args);`})]}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`\t}`})}),`\n`,_jsx(_components.span,{className:`line`}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`}`})}),`\n`]})})}),_jsx(CodeBlock,{filename:`Kotlin`,numberOfLines:`13`,language:`kotlin`,children:_jsx(_components.pre,{className:`shiki shiki-themes github-light-default dark-plus`,style:{backgroundColor:`#ffffff`,\"--shiki-dark-bg\":`#0B0C0E`,color:`#1f2328`,\"--shiki-dark\":`#D4D4D4`},language:`kotlin`,children:_jsxs(_components.code,{language:`kotlin`,numberOfLines:`13`,children:[_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#569CD6`},children:`package`}),_jsx(_components.span,{style:{color:`#953800`,\"--shiki-dark\":`#D4D4D4`},children:` com.example.restatestarter`})]}),`\n`,_jsx(_components.span,{className:`line`}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#569CD6`},children:`import`}),_jsx(_components.span,{style:{color:`#953800`,\"--shiki-dark\":`#D4D4D4`},children:` dev.restate.sdk.springboot.EnableRestate`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#569CD6`},children:`import`}),_jsx(_components.span,{style:{color:`#953800`,\"--shiki-dark\":`#D4D4D4`},children:` org.springframework.boot.autoconfigure.SpringBootApplication`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#569CD6`},children:`import`}),_jsx(_components.span,{style:{color:`#953800`,\"--shiki-dark\":`#D4D4D4`},children:` org.springframework.boot.runApplication`})]}),`\n`,_jsx(_components.span,{className:`line`}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#953800`,\"--shiki-dark\":`#4EC9B0`},children:`@SpringBootApplication`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#953800`,\"--shiki-dark\":`#4EC9B0`},children:`@EnableRestate`})}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#569CD6`},children:`class`}),_jsx(_components.span,{style:{color:`#953800`,\"--shiki-dark\":`#4EC9B0`},children:` RestateStarterApplication`})]}),`\n`,_jsx(_components.span,{className:`line`}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#569CD6`},children:`fun`}),_jsx(_components.span,{style:{color:`#8250DF`,\"--shiki-dark\":`#DCDCAA`},children:` main`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`(args: `}),_jsx(_components.span,{style:{color:`#953800`,\"--shiki-dark\":`#4EC9B0`},children:`Array`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`\u003c`}),_jsx(_components.span,{style:{color:`#953800`,\"--shiki-dark\":`#4EC9B0`},children:`String`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`>) {`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#8250DF`,\"--shiki-dark\":`#DCDCAA`},children:`\trunApplication`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`\u003c`}),_jsx(_components.span,{style:{color:`#953800`,\"--shiki-dark\":`#4EC9B0`},children:`RestateStarterApplication`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`>(`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D4D4D4`},children:`*`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`args)`})]}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`}`})}),`\n`]})})})]}),`\n`,_jsx(Heading,{level:`2`,id:`defining-services`,children:`Defining services`}),`\n`,_jsxs(_components.p,{children:[`Annotate your service class with `,_jsx(_components.a,{href:`https://docs.restate.dev/javadocs/dev/restate/sdk/springboot/RestateComponent.html`,children:_jsx(_components.code,{children:`@RestateComponent`})}),` `,_jsx(_components.strong,{children:`in addition to`}),` the usual `,_jsx(_components.code,{children:`@Service`}),`, `,_jsx(_components.code,{children:`@VirtualObject`}),`, or `,_jsx(_components.code,{children:`@Workflow`}),` annotation.`]}),`\n`,_jsxs(_components.p,{children:[`Unlike the `,_jsx(_components.a,{href:`/develop/java/serving`,children:`standalone setup`}),`, the service has no `,_jsx(_components.code,{children:`main`}),`: Spring Boot binds and serves it.`]}),`\n`,_jsxs(_components.p,{children:[_jsx(_components.code,{children:`@RestateComponent`}),` is like any other Spring’s `,_jsx(_components.code,{children:`@Component`}),`: inject configuration and other beans as usual (`,_jsx(_components.code,{children:`@Value`}),`, constructor injection, …).`]}),`\n`,_jsxs(CodeGroup,{children:[_jsx(CodeBlock,{filename:`Java`,numberOfLines:`22`,language:`java`,children:_jsx(_components.pre,{className:`shiki shiki-themes github-light-default dark-plus`,style:{backgroundColor:`#ffffff`,\"--shiki-dark-bg\":`#0B0C0E`,color:`#1f2328`,\"--shiki-dark\":`#D4D4D4`},language:`java`,children:_jsxs(_components.code,{language:`java`,numberOfLines:`22`,children:[_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`@`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#4EC9B0`},children:`RestateComponent`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`@`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#4EC9B0`},children:`Service`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#569CD6`},children:`public`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#569CD6`},children:` class`}),_jsx(_components.span,{style:{color:`#953800`,\"--shiki-dark\":`#4EC9B0`},children:` Greeter`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` {`})]}),`\n`,_jsx(_components.span,{className:`line`}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` @`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#4EC9B0`},children:`Value`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`(`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:'\"${greetingPrefix}\"'}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`)`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#569CD6`},children:` private`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#4EC9B0`},children:` String`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:` greetingPrefix`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`;`})]}),`\n`,_jsx(_components.span,{className:`line`}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#569CD6`},children:` public`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#569CD6`},children:` record`}),_jsx(_components.span,{style:{color:`#953800`,\"--shiki-dark\":`#4EC9B0`},children:` Greeting`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`(`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#4EC9B0`},children:`String`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` name) {}`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#569CD6`},children:` public`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#569CD6`},children:` record`}),_jsx(_components.span,{style:{color:`#953800`,\"--shiki-dark\":`#4EC9B0`},children:` GreetingResponse`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`(`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#4EC9B0`},children:`String`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` message) {}`})]}),`\n`,_jsx(_components.span,{className:`line`}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` @`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#4EC9B0`},children:`Handler`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#569CD6`},children:` public`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#4EC9B0`},children:` GreetingResponse`}),_jsx(_components.span,{style:{color:`#8250DF`,\"--shiki-dark\":`#DCDCAA`},children:` greet`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`(`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#4EC9B0`},children:`Greeting`}),_jsx(_components.span,{style:{color:`#953800`,\"--shiki-dark\":`#9CDCFE`},children:` req`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`) {`})]}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#6E7781`,\"--shiki-dark\":`#6A9955`},children:` // Durably execute a set of steps; resilient against failures`})}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#4EC9B0`},children:` String`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:` greetingId`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D4D4D4`},children:` =`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:` Restate`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`.`}),_jsx(_components.span,{style:{color:`#8250DF`,\"--shiki-dark\":`#DCDCAA`},children:`random`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`().`}),_jsx(_components.span,{style:{color:`#8250DF`,\"--shiki-dark\":`#DCDCAA`},children:`nextUUID`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`().`}),_jsx(_components.span,{style:{color:`#8250DF`,\"--shiki-dark\":`#DCDCAA`},children:`toString`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`();`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:` Restate`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`.`}),_jsx(_components.span,{style:{color:`#8250DF`,\"--shiki-dark\":`#DCDCAA`},children:`run`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`(`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"Notification\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`, () `}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#569CD6`},children:`->`}),_jsx(_components.span,{style:{color:`#8250DF`,\"--shiki-dark\":`#DCDCAA`},children:` sendNotification`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`(greetingId, `}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`req`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`.`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`name`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`));`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:` Restate`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`.`}),_jsx(_components.span,{style:{color:`#8250DF`,\"--shiki-dark\":`#DCDCAA`},children:`sleep`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`(`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`Duration`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`.`}),_jsx(_components.span,{style:{color:`#8250DF`,\"--shiki-dark\":`#DCDCAA`},children:`ofSeconds`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`(`}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#B5CEA8`},children:`1`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`));`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:` Restate`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`.`}),_jsx(_components.span,{style:{color:`#8250DF`,\"--shiki-dark\":`#DCDCAA`},children:`run`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`(`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"Reminder\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`, () `}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#569CD6`},children:`->`}),_jsx(_components.span,{style:{color:`#8250DF`,\"--shiki-dark\":`#DCDCAA`},children:` sendReminder`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`(greetingId, `}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`req`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`.`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`name`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`));`})]}),`\n`,_jsx(_components.span,{className:`line`}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#6E7781`,\"--shiki-dark\":`#6A9955`},children:` // Respond to caller`})}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#C586C0`},children:` return`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#C586C0`},children:` new`}),_jsx(_components.span,{style:{color:`#8250DF`,\"--shiki-dark\":`#DCDCAA`},children:` GreetingResponse`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`(`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"You said \"`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D4D4D4`},children:` +`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` greetingPrefix `}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D4D4D4`},children:`+`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` \" to \"`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D4D4D4`},children:` +`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:` req`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`.`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`name`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D4D4D4`},children:` +`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` \"!\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`);`})]}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` }`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`}`})}),`\n`]})})}),_jsx(CodeBlock,{filename:`Kotlin`,numberOfLines:`24`,language:`kotlin`,children:_jsx(_components.pre,{className:`shiki shiki-themes github-light-default dark-plus`,style:{backgroundColor:`#ffffff`,\"--shiki-dark-bg\":`#0B0C0E`,color:`#1f2328`,\"--shiki-dark\":`#D4D4D4`},language:`kotlin`,children:_jsxs(_components.code,{language:`kotlin`,numberOfLines:`24`,children:[_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#953800`,\"--shiki-dark\":`#4EC9B0`},children:`@RestateComponent`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#953800`,\"--shiki-dark\":`#4EC9B0`},children:`@Service`})}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#569CD6`},children:`class`}),_jsx(_components.span,{style:{color:`#953800`,\"--shiki-dark\":`#4EC9B0`},children:` Greeter`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` {`})]}),`\n`,_jsx(_components.span,{className:`line`}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#953800`,\"--shiki-dark\":`#4EC9B0`},children:` @Value`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`(`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D7BA7D`},children:`\\\\$`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`{greetingPrefix}\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`)`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#569CD6`},children:` lateinit`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#569CD6`},children:` var`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` greetingPrefix: `}),_jsx(_components.span,{style:{color:`#953800`,\"--shiki-dark\":`#4EC9B0`},children:`String`})]}),`\n`,_jsx(_components.span,{className:`line`}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#953800`,\"--shiki-dark\":`#4EC9B0`},children:` @Serializable`})}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#569CD6`},children:` data`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#569CD6`},children:` class`}),_jsx(_components.span,{style:{color:`#953800`,\"--shiki-dark\":`#4EC9B0`},children:` Greeting`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`(`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#569CD6`},children:`val`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` name: `}),_jsx(_components.span,{style:{color:`#953800`,\"--shiki-dark\":`#4EC9B0`},children:`String`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`)`})]}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#953800`,\"--shiki-dark\":`#4EC9B0`},children:` @Serializable`})}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#569CD6`},children:` data`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#569CD6`},children:` class`}),_jsx(_components.span,{style:{color:`#953800`,\"--shiki-dark\":`#4EC9B0`},children:` GreetingResponse`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`(`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#569CD6`},children:`val`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` message: `}),_jsx(_components.span,{style:{color:`#953800`,\"--shiki-dark\":`#4EC9B0`},children:`String`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`)`})]}),`\n`,_jsx(_components.span,{className:`line`}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#953800`,\"--shiki-dark\":`#4EC9B0`},children:` @Handler`})}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#569CD6`},children:` suspend`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#569CD6`},children:` fun`}),_jsx(_components.span,{style:{color:`#8250DF`,\"--shiki-dark\":`#DCDCAA`},children:` greet`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`(req: `}),_jsx(_components.span,{style:{color:`#953800`,\"--shiki-dark\":`#4EC9B0`},children:`Greeting`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`): `}),_jsx(_components.span,{style:{color:`#953800`,\"--shiki-dark\":`#4EC9B0`},children:`GreetingResponse`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` {`})]}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#6E7781`,\"--shiki-dark\":`#6A9955`},children:` // Durably execute a set of steps; resilient against failures`})}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#569CD6`},children:` val`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` greetingId `}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D4D4D4`},children:`=`}),_jsx(_components.span,{style:{color:`#8250DF`,\"--shiki-dark\":`#DCDCAA`},children:` random`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`().`}),_jsx(_components.span,{style:{color:`#8250DF`,\"--shiki-dark\":`#DCDCAA`},children:`nextUUID`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`().`}),_jsx(_components.span,{style:{color:`#8250DF`,\"--shiki-dark\":`#DCDCAA`},children:`toString`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`()`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#8250DF`,\"--shiki-dark\":`#DCDCAA`},children:` runBlock`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`(`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"Notification\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`) { `}),_jsx(_components.span,{style:{color:`#8250DF`,\"--shiki-dark\":`#DCDCAA`},children:`sendNotification`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`(greetingId, req.name) }`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#8250DF`,\"--shiki-dark\":`#DCDCAA`},children:` sleep`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`(`}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#B5CEA8`},children:`1`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`.seconds)`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#8250DF`,\"--shiki-dark\":`#DCDCAA`},children:` runBlock`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`(`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"Reminder\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`) { `}),_jsx(_components.span,{style:{color:`#8250DF`,\"--shiki-dark\":`#DCDCAA`},children:`sendReminder`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`(greetingId, req.name) }`})]}),`\n`,_jsx(_components.span,{className:`line`}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#6E7781`,\"--shiki-dark\":`#6A9955`},children:` // Respond to caller`})}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#C586C0`},children:` return`}),_jsx(_components.span,{style:{color:`#8250DF`,\"--shiki-dark\":`#DCDCAA`},children:` GreetingResponse`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`(`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"You said `}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#9CDCFE`},children:`$greetingPrefix`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` to `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#569CD6`},children:\"${\"}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#D4D4D4`},children:`req.name`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#569CD6`},children:`}`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`!\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`)`})]}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` }`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`}`})}),`\n`]})})})]}),`\n`,_jsxs(_components.p,{children:[`Everything inside the handler works exactly as in the standalone SDK: use the `,_jsx(_components.code,{children:`Restate`}),` static methods (Java) or the top-level functions in `,_jsx(_components.code,{children:`dev.restate.sdk.kotlin`}),` (Kotlin) for state, calls, side effects, and timers.`]}),`\n`,_jsx(Heading,{level:`2`,id:`calling-restate-from-spring`,children:`Calling Restate from Spring`}),`\n`,_jsxs(_components.p,{children:[`The starter registers a `,_jsx(_components.a,{href:`https://docs.restate.dev/javadocs/dev/restate/client/Client.html`,children:_jsx(_components.code,{children:`Client`})}),` bean. Inject it into any Spring component (controllers, scheduled tasks, …) to invoke your handlers from outside a Restate context:`]}),`\n`,_jsx(CodeBlock,{filename:``,numberOfLines:`22`,language:`java`,children:_jsx(_components.pre,{className:`shiki shiki-themes github-light-default dark-plus`,style:{backgroundColor:`#ffffff`,\"--shiki-dark-bg\":`#0B0C0E`,color:`#1f2328`,\"--shiki-dark\":`#D4D4D4`},language:`java`,children:_jsxs(_components.code,{language:`java`,numberOfLines:`22`,children:[_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#569CD6`},children:`package`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` com.example.restatestarter;`})]}),`\n`,_jsx(_components.span,{className:`line`}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#569CD6`},children:`import`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` com.example.restatestarter.Greeter.Greeting;`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#569CD6`},children:`import`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` dev.restate.client.Client;`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#569CD6`},children:`import`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` org.springframework.web.bind.annotation.GetMapping;`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#569CD6`},children:`import`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` org.springframework.web.bind.annotation.RestController;`})]}),`\n`,_jsx(_components.span,{className:`line`}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`@`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#4EC9B0`},children:`RestController`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#569CD6`},children:`public`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#569CD6`},children:` class`}),_jsx(_components.span,{style:{color:`#953800`,\"--shiki-dark\":`#4EC9B0`},children:` HelloController`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` {`})]}),`\n`,_jsx(_components.span,{className:`line`}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#569CD6`},children:`\tprivate`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#569CD6`},children:` final`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#4EC9B0`},children:` Client`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:` restateClient`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`;`})]}),`\n`,_jsx(_components.span,{className:`line`}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#569CD6`},children:` public`}),_jsx(_components.span,{style:{color:`#8250DF`,\"--shiki-dark\":`#DCDCAA`},children:` HelloController`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`(`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#4EC9B0`},children:`Client`}),_jsx(_components.span,{style:{color:`#953800`,\"--shiki-dark\":`#9CDCFE`},children:` restateClient`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`) {`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#569CD6`},children:` this`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`.`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`restateClient`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D4D4D4`},children:` =`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` restateClient;`})]}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` }`})}),`\n`,_jsx(_components.span,{className:`line`}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` @`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#4EC9B0`},children:`GetMapping`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`(`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"/\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`)`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#569CD6`},children:`\tpublic`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#4EC9B0`},children:` String`}),_jsx(_components.span,{style:{color:`#8250DF`,\"--shiki-dark\":`#DCDCAA`},children:` index`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`() {`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#C586C0`},children:`\t\treturn`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:` restateClient`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`.`}),_jsx(_components.span,{style:{color:`#8250DF`,\"--shiki-dark\":`#DCDCAA`},children:`service`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`(`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`Greeter`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`.`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`class`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`).`}),_jsx(_components.span,{style:{color:`#8250DF`,\"--shiki-dark\":`#DCDCAA`},children:`greet`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`(`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#C586C0`},children:`new`}),_jsx(_components.span,{style:{color:`#8250DF`,\"--shiki-dark\":`#DCDCAA`},children:` Greeting`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`(`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"Alice\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`)) `}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D4D4D4`},children:`+`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` \" from Spring Boot!\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`;`})]}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`\t}`})}),`\n`,_jsx(_components.span,{className:`line`}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`}`})}),`\n`]})})}),`\n`,_jsxs(_components.p,{children:[`In Kotlin, inject the same `,_jsx(_components.code,{children:`Client`}),` bean through the constructor.`]}),`\n`,_jsx(Heading,{level:`2`,id:`configuration`,children:`Configuration`}),`\n`,_jsxs(_components.p,{children:[`Configure the SDK endpoint and the injected client via `,_jsx(_components.code,{children:`application.properties`}),` (or `,_jsx(_components.code,{children:`application.yml`}),`):`]}),`\n`,_jsx(CodeBlock,{filename:``,numberOfLines:`5`,language:`ini`,children:_jsx(_components.pre,{className:`shiki shiki-themes github-light-default dark-plus`,style:{backgroundColor:`#ffffff`,\"--shiki-dark-bg\":`#0B0C0E`,color:`#1f2328`,\"--shiki-dark\":`#D4D4D4`},language:`ini`,children:_jsxs(_components.code,{language:`ini`,numberOfLines:`5`,children:[_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#6E7781`,\"--shiki-dark\":`#6A9955`},children:`# Port where the Restate SDK endpoint is exposed (default 9080)`})}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#569CD6`},children:`restate.sdk.http.port`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`=9080`})]}),`\n`,_jsx(_components.span,{className:`line`}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#6E7781`,\"--shiki-dark\":`#6A9955`},children:`# Base URI of the Restate ingress, used by the injected Client`})}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#569CD6`},children:`restate.client.base-uri`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`=http://localhost:8080`})]}),`\n`]})})}),`\n`,_jsxs(_components.p,{children:[`Service- and handler-level options (retention, timeouts, retry policies, …) are set with `,_jsx(_components.code,{children:`restate.components.\u003cServiceName>.*`}),` properties. See `,_jsx(_components.a,{href:`/services/configuration#service-level-configuration`,children:`service configuration`}),` for the full list.`]})]})}function MDXContent(props={}){const{wrapper:MDXLayout}={..._provideComponents(),...props.components};return MDXLayout?_jsx(MDXLayout,{...props,children:_jsx(_createMdxContent,{...props})}):_createMdxContent(props)}return{default:MDXContent};function _missingMdxReference(id,component){throw new Error(`Expected `+(component?`component`:`object`)+\" `\"+id+\"` to be defined: you likely forgot to import, pass, or provide it.\")}","frontmatter":{},"scope":{"config":{},"pageMetadata":{"title":"Spring Boot","description":"Run Restate services inside a Spring Boot application with dependency injection.","icon":"leaf","href":"/develop/java/spring-boot"}}},"mdxSourceWithNoJs":null},"mdxExtracts":{"tableOfContents":[{"title":"Dependencies","slug":"dependencies","depth":2,"children":[]},{"title":"Enabling Restate","slug":"enabling-restate","depth":2,"children":[]},{"title":"Defining services","slug":"defining-services","depth":2,"children":[]},{"title":"Calling Restate from Spring","slug":"calling-restate-from-spring","depth":2,"children":[]},{"title":"Configuration","slug":"configuration","depth":2,"children":[]}],"codeExamples":{}},"jsLinks":["/_mintlify/custom/restate-6d46e1dc/fe33ed8c8f6baacd/matomo.js","/_mintlify/custom/restate-6d46e1dc/4d0b5d686abf67ad/scarf.js","/_mintlify/custom/restate-6d46e1dc/28474ce7323ba556/cookie-consent.js"],"subdomain":"restate-6d46e1dc","siteName":"Restate","title":"Spring Boot - Restate","navMaps":{"firstHrefInVersion":{},"firstHrefInLanguage":{}},"lastModified":"2026-07-21T10:07:41.254Z","originalFileLocation":"develop/java/spring-boot.mdx"},"headHtml":"\u003cscript data-mint-head>(function(){var d=document.documentElement,p=\"light\";if(!p){try{p=localStorage.getItem(\"isDarkMode\")}catch(e){}if(p==='true')p='dark';else if(p==='false')p='light';if(p!=='light'\u0026\u0026p!=='dark'\u0026\u0026p!=='system')p=\"light\"}var r=p==='system'?(matchMedia(\"(prefers-color-scheme: dark)\").matches?'dark':'light'):p;d.classList.remove(r==='dark'?'light':'dark');d.classList.add(r);d.setAttribute(\"data-theme-preference\",p)})();\u003c/script>\u003cmeta data-mint-head name=\"description\" content=\"Run Restate services inside a Spring Boot application with dependency injection.\">\u003cmeta data-mint-head name=\"application-name\" content=\"Restate\">\u003cmeta data-mint-head name=\"generator\" content=\"Mintlify\">\u003clink data-mint-head rel=\"icon\" type=\"image/png\" sizes=\"192x192\" href=\"/mintlify-assets/_mintlify/favicons/restate-6d46e1dc/aPguAmH_f4I6oEvV/_generated/favicon/android-chrome-192x192.png\" media=\"(prefers-color-scheme: light)\">\u003clink data-mint-head rel=\"apple-touch-icon\" type=\"image/png\" sizes=\"180x180\" href=\"/mintlify-assets/_mintlify/favicons/restate-6d46e1dc/aPguAmH_f4I6oEvV/_generated/favicon/apple-touch-icon.png\">\u003clink data-mint-head rel=\"icon\" type=\"image/png\" sizes=\"16x16\" href=\"/mintlify-assets/_mintlify/favicons/restate-6d46e1dc/aPguAmH_f4I6oEvV/_generated/favicon/favicon-16x16.png\" media=\"(prefers-color-scheme: light)\">\u003clink data-mint-head rel=\"icon\" type=\"image/png\" sizes=\"32x32\" href=\"/mintlify-assets/_mintlify/favicons/restate-6d46e1dc/aPguAmH_f4I6oEvV/_generated/favicon/favicon-32x32.png\" media=\"(prefers-color-scheme: light)\">\u003clink data-mint-head rel=\"shortcut icon\" type=\"image/x-icon\" href=\"/mintlify-assets/_mintlify/favicons/restate-6d46e1dc/aPguAmH_f4I6oEvV/_generated/favicon/favicon.ico\" media=\"(prefers-color-scheme: light)\">\u003clink data-mint-head rel=\"icon\" type=\"image/png\" sizes=\"192x192\" href=\"/mintlify-assets/_mintlify/favicons/restate-6d46e1dc/aPguAmH_f4I6oEvV/_generated/favicon-dark/android-chrome-192x192.png\" media=\"(prefers-color-scheme: dark)\">\u003clink data-mint-head rel=\"icon\" type=\"image/png\" sizes=\"16x16\" href=\"/mintlify-assets/_mintlify/favicons/restate-6d46e1dc/aPguAmH_f4I6oEvV/_generated/favicon-dark/favicon-16x16.png\" media=\"(prefers-color-scheme: dark)\">\u003clink data-mint-head rel=\"icon\" type=\"image/png\" sizes=\"32x32\" href=\"/mintlify-assets/_mintlify/favicons/restate-6d46e1dc/aPguAmH_f4I6oEvV/_generated/favicon-dark/favicon-32x32.png\" media=\"(prefers-color-scheme: dark)\">\u003clink data-mint-head rel=\"shortcut icon\" type=\"image/x-icon\" href=\"/mintlify-assets/_mintlify/favicons/restate-6d46e1dc/aPguAmH_f4I6oEvV/_generated/favicon-dark/favicon.ico\" media=\"(prefers-color-scheme: dark)\">\u003cmeta data-mint-head property=\"og:title\" content=\"Spring Boot - Restate\">\u003cmeta data-mint-head property=\"og:description\" content=\"Run Restate services inside a Spring Boot application with dependency injection.\">\u003cmeta data-mint-head property=\"og:site_name\" content=\"Restate\">\u003cmeta data-mint-head property=\"og:url\" content=\"https://docs.restate.dev/develop/java/spring-boot\">\u003cmeta data-mint-head property=\"og:type\" content=\"website\">\u003cmeta data-mint-head property=\"og:image\" content=\"https://restate-6d46e1dc.mintlify.app/_mintlify/api/og/v2?division=Java%2FKotlin\u0026amp;title=Spring+Boot\u0026amp;description=Run+Restate+services+inside+a+Spring+Boot+application+with+dependency+injection.\u0026amp;theme=35f97c6a72f75e34ad939f4f\u0026amp;signature=73a9910c83a4068d9da15446ab357b46b3c88159f55e2f2c99ede72f54a124af\">\u003cmeta data-mint-head property=\"og:image:width\" content=\"1200\">\u003cmeta data-mint-head property=\"og:image:height\" content=\"630\">\u003cmeta data-mint-head name=\"twitter:card\" content=\"summary_large_image\">\u003cmeta data-mint-head name=\"twitter:title\" content=\"Spring Boot - Restate\">\u003cmeta data-mint-head name=\"twitter:description\" content=\"Run Restate services inside a Spring Boot application with dependency injection.\">\u003cmeta data-mint-head name=\"twitter:image\" content=\"https://restate-6d46e1dc.mintlify.app/_mintlify/api/og/v2?division=Java%2FKotlin\u0026amp;title=Spring+Boot\u0026amp;description=Run+Restate+services+inside+a+Spring+Boot+application+with+dependency+injection.\u0026amp;theme=35f97c6a72f75e34ad939f4f\u0026amp;signature=73a9910c83a4068d9da15446ab357b46b3c88159f55e2f2c99ede72f54a124af\">\u003cmeta data-mint-head name=\"twitter:image:width\" content=\"1200\">\u003cmeta data-mint-head name=\"twitter:image:height\" content=\"630\">\u003cmeta data-mint-head name=\"msapplication-config\" content=\"/mintlify-assets/_mintlify/favicons/restate-6d46e1dc/aPguAmH_f4I6oEvV/_generated/favicon/browserconfig.xml\">\u003cmeta data-mint-head name=\"apple-mobile-web-app-title\" content=\"Restate\">\u003cmeta data-mint-head name=\"msapplication-TileColor\" content=\"#4752c4\">\u003clink data-mint-head rel=\"canonical\" href=\"https://docs.restate.dev/develop/java/spring-boot\">\u003clink data-mint-head rel=\"alternate\" type=\"application/xml\" href=\"/sitemap.xml\">\u003clink data-mint-head rel=\"alternate\" type=\"text/markdown\" href=\"/develop/java/spring-boot.md\">\u003cscript data-mint-head type=\"application/ld+json\">{\"@context\":\"https://schema.org\",\"@graph\":[{\"@type\":\"Organization\",\"@id\":\"https://docs.restate.dev/#organization\",\"name\":\"Restate\",\"url\":\"https://docs.restate.dev\",\"logo\":{\"@type\":\"ImageObject\",\"url\":\"https://mintcdn.com/restate-6d46e1dc/0MkLgffDAGHkNDIZ/logo/light.svg?fit=max\u0026auto=format\u0026n=0MkLgffDAGHkNDIZ\u0026q=85\u0026s=70e648c2608af2d2c33dc26b3bce13d3\"}},{\"@type\":\"WebSite\",\"@id\":\"https://docs.restate.dev#website\",\"name\":\"Restate\",\"url\":\"https://docs.restate.dev\",\"publisher\":{\"@id\":\"https://docs.restate.dev/#organization\"}},{\"@type\":\"WebPage\",\"@id\":\"https://docs.restate.dev/develop/java/spring-boot#webpage\",\"url\":\"https://docs.restate.dev/develop/java/spring-boot\",\"name\":\"Spring Boot\",\"description\":\"Run Restate services inside a Spring Boot application with dependency injection.\",\"dateModified\":\"2026-07-21T10:07:41.254Z\",\"isPartOf\":{\"@id\":\"https://docs.restate.dev#website\"},\"breadcrumb\":{\"@id\":\"https://docs.restate.dev/develop/java/spring-boot#breadcrumb\"}},{\"@type\":\"BreadcrumbList\",\"@id\":\"https://docs.restate.dev/develop/java/spring-boot#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"SDKs\",\"item\":\"https://docs.restate.dev/develop/ts/services\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"Java/Kotlin\",\"item\":\"https://docs.restate.dev/develop/java/services\"},{\"@type\":\"ListItem\",\"position\":3,\"name\":\"Spring Boot\",\"item\":\"https://docs.restate.dev/develop/java/spring-boot\"}]},{\"@type\":[\"Article\",\"TechArticle\"],\"@id\":\"https://docs.restate.dev/develop/java/spring-boot#article\",\"headline\":\"Spring Boot\",\"name\":\"Spring Boot\",\"description\":\"Run Restate services inside a Spring Boot application with dependency injection.\",\"url\":\"https://docs.restate.dev/develop/java/spring-boot\",\"mainEntityOfPage\":{\"@id\":\"https://docs.restate.dev/develop/java/spring-boot#webpage\"},\"dateModified\":\"2026-07-21T10:07:41.254Z\",\"publisher\":{\"@id\":\"https://docs.restate.dev/#organization\"},\"isPartOf\":{\"@id\":\"https://docs.restate.dev#website\"}}]}\u003c/script>\u003cscript data-mint-head type=\"application/ld+json\">{\"@context\":\"https://schema.org\",\"@type\":\"WebSite\",\"name\":\"Restate\",\"creator\":{\"@type\":\"Organization\",\"name\":\"Mintlify\",\"url\":\"https://mintlify.com\"}}\u003c/script>","siteName":"Restate","nav":{"global":null,"tabs":[{"tab":"Learn","icon":"graduation-cap","pages":[{"title":"Learn","href":""}]},{"tab":"Docs","icon":"hammer","pages":[{"title":"Documentation","sidebarTitle":"Overview","icon":"book-open","mode":"wide","href":"/docs"},{"title":"Installation","icon":"download","href":"/installation"},{"group":"SDKs","pages":[{"group":"TypeScript","icon":"/img/languages/typescript.svg","pages":[{"title":"Services","icon":"brackets-curly","href":"/develop/ts/services"},{"title":"Durable Steps","icon":"list-check","href":"/develop/ts/durable-steps"},{"title":"Service Communication","sidebarTitle":"Communication","icon":"comment","href":"/develop/ts/service-communication"},{"title":"State","icon":"database","href":"/develop/ts/state"},{"title":"Signals and external events","icon":"hourglass-start","href":"/develop/ts/external-events"},{"title":"Scheduling \u0026 Timers","icon":"timer","href":"/develop/ts/durable-timers"},{"title":"Concurrency / Coroutines","icon":"merge","href":"/develop/ts/concurrent-tasks"},{"title":"Error Handling","icon":"triangle-exclamation","href":"/develop/ts/error-handling"},{"title":"Hooks","icon":"plug","href":"/develop/ts/hooks"},{"title":"Serialization","icon":"file-code","href":"/develop/ts/serialization"},{"title":"Serving","icon":"globe","href":"/develop/ts/serving"},{"title":"Testing","icon":"bug","href":"/develop/ts/testing"},{"title":"Logging","icon":"file-lines","href":"/develop/ts/logging"},{"title":"Tracing","icon":"magnifying-glass","href":"/develop/ts/tracing"}]},{"group":"Java/Kotlin","icon":"/img/languages/java.svg","pages":[{"title":"Services","icon":"brackets-curly","href":"/develop/java/services"},{"title":"Durable Steps","icon":"list-check","href":"/develop/java/durable-steps"},{"title":"Service Communication","sidebarTitle":"Communication","icon":"comment","href":"/develop/java/service-communication"},{"title":"State","icon":"database","href":"/develop/java/state"},{"title":"Signals and external events","icon":"hourglass-start","href":"/develop/java/external-events"},{"title":"Scheduling \u0026 Timers","icon":"timer","href":"/develop/java/durable-timers"},{"title":"Concurrent Tasks","icon":"merge","href":"/develop/java/concurrent-tasks"},{"title":"Error Handling","icon":"triangle-exclamation","href":"/develop/java/error-handling"},{"title":"Serialization","icon":"file-code","href":"/develop/java/serialization"},{"title":"Serving","description":"Create an endpoint to serve your services.","icon":"globe","href":"/develop/java/serving"},{"title":"Spring Boot","icon":"leaf","href":"/develop/java/spring-boot"},{"title":"Testing","description":"Utilities to test your handler logic.","icon":"bug","href":"/develop/java/testing"},{"title":"Logging","icon":"file-lines","href":"/develop/java/logging"},{"title":"Tracing","icon":"magnifying-glass","href":"/develop/java/tracing"}]},{"group":"Python","icon":"/img/languages/python.svg","pages":[{"title":"Services","icon":"brackets-curly","href":"/develop/python/services"},{"title":"Durable Steps","icon":"list-check","href":"/develop/python/durable-steps"},{"title":"Service Communication","sidebarTitle":"Communication","icon":"comment","href":"/develop/python/service-communication"},{"title":"State","icon":"database","href":"/develop/python/state"},{"title":"Signals and external events","icon":"hourglass-start","href":"/develop/python/external-events"},{"title":"Scheduling \u0026 Timers","icon":"timer","href":"/develop/python/durable-timers"},{"title":"Concurrent Tasks","icon":"merge","href":"/develop/python/concurrent-tasks"},{"title":"Error Handling","icon":"triangle-exclamation","href":"/develop/python/error-handling"},{"title":"Serialization","icon":"file-code","href":"/develop/python/serialization"},{"title":"Serving","icon":"globe","href":"/develop/python/serving"},{"title":"Testing","icon":"bug","href":"/develop/python/testing"},{"title":"Logging","icon":"file-lines","href":"/develop/python/logging"}]},{"group":"Go","icon":"/img/languages/go.svg","pages":[{"title":"Services","icon":"brackets-curly","href":"/develop/go/services"},{"title":"Durable Steps","icon":"list-check","href":"/develop/go/durable-steps"},{"title":"Service Communication","sidebarTitle":"Communication","icon":"comment","href":"/develop/go/service-communication"},{"title":"State","icon":"database","href":"/develop/go/state"},{"title":"Signals and external events","icon":"hourglass-start","href":"/develop/go/external-events"},{"title":"Scheduling \u0026 Timers","icon":"timer","href":"/develop/go/durable-timers"},{"title":"Concurrent Tasks","icon":"merge","href":"/develop/go/concurrent-tasks"},{"title":"Error Handling","icon":"triangle-exclamation","href":"/develop/go/error-handling"},{"title":"Serving","icon":"globe","href":"/develop/go/serving"},{"title":"Testing","icon":"bug","href":"/develop/go/testing"},{"title":"Logging","icon":"file-lines","href":"/develop/go/logging"},{"title":"Code Generation","icon":"code","href":"/develop/go/code-generation"}]},{"title":"Rust SDK","icon":"https://mintlify.s3.us-west-1.amazonaws.com/restate-6d46e1dc/img/languages/rust.svg","url":"https://docs.rs/restate-sdk/latest/restate_sdk/","href":"/develop/rust"},{"title":"Ruby SDK","icon":"https://mintlify.s3.us-west-1.amazonaws.com/restate-6d46e1dc/img/languages/ruby.svg","url":"https://github.com/restatedev/sdk-ruby","href":"/develop/ruby"},{"title":"Develop with AI","icon":"robot","href":"/develop/ai-assistant"}]},{"group":"Services","pages":[{"group":"Deploy","icon":"box","pages":[{"title":"Kubernetes","icon":"https://mintlify.s3.us-west-1.amazonaws.com/restate-6d46e1dc/img/cloud-providers/kubernetes.svg","href":"/services/deploy/kubernetes"},{"title":"Google Cloud Run","icon":"https://mintlify.s3.us-west-1.amazonaws.com/restate-6d46e1dc/img/cloud-providers/google-cloud-run.svg","href":"/services/deploy/cloud-run"},{"title":"Vercel","icon":"https://mintlify.s3.us-west-1.amazonaws.com/restate-6d46e1dc/img/cloud-providers/vercel.svg","href":"/services/deploy/vercel"},{"title":"AWS Lambda","icon":"https://mintlify.s3.us-west-1.amazonaws.com/restate-6d46e1dc/img/cloud-providers/aws-lambda.svg","href":"/services/deploy/lambda"},{"title":"Cloudflare Workers","icon":"https://mintlify.s3.us-west-1.amazonaws.com/restate-6d46e1dc/img/cloud-providers/cloudflare-workers.svg","href":"/services/deploy/cloudflare-workers"},{"title":"Other serverless platforms","icon":"https://mintlify.s3.us-west-1.amazonaws.com/restate-6d46e1dc/img/cloud-providers/other-serverless.svg","href":"/services/deploy/other-serverless-platforms"},{"title":"Containers and VMs","icon":"https://mintlify.s3.us-west-1.amazonaws.com/restate-6d46e1dc/img/cloud-providers/docker.svg","href":"/services/deploy/standalone"}]},{"group":"Invocation","icon":"phone","pages":[{"title":"HTTP","href":"/services/invocation/http"},{"group":"SDK Clients","pages":[{"title":"TypeScript SDK Clients","sidebarTitle":"TypeScript","icon":"https://mintlify.s3.us-west-1.amazonaws.com/restate-6d46e1dc/img/languages/typescript.svg","href":"/services/invocation/clients/typescript-sdk"},{"title":"Java/Kotlin SDK Clients","sidebarTitle":"Java/Kotlin","icon":"https://mintlify.s3.us-west-1.amazonaws.com/restate-6d46e1dc/img/languages/java.svg","href":"/services/invocation/clients/java-sdk"},{"title":"Python SDK Clients","sidebarTitle":"Python","icon":"https://mintlify.s3.us-west-1.amazonaws.com/restate-6d46e1dc/img/languages/python.svg","href":"/services/invocation/clients/python-sdk"},{"title":"Go SDK Clients","sidebarTitle":"Go","icon":"https://mintlify.s3.us-west-1.amazonaws.com/restate-6d46e1dc/img/languages/go.svg","href":"/services/invocation/clients/go-sdk"}]},{"title":"Kafka","href":"/services/invocation/kafka"},{"title":"Managing Invocations","sidebarTitle":"Managing Invocations","href":"/services/invocation/managing-invocations"}]},{"group":"Integrations","icon":"circle-nodes","pages":[{"title":"Kafka","href":"/services/integrations/kafka"},{"title":"Build your own integration","href":"/services/integrations/build_your_own"}]},{"title":"Flow Control","sidebarTitle":"Flow control","icon":"gauge","href":"/services/flow-control"},{"title":"Versioning","icon":"send-backward","href":"/services/versioning"},{"title":"Security","icon":"shield","href":"/services/security"},{"title":"Service Configuration","sidebarTitle":"Configuration","icon":"sliders-simple","href":"/services/configuration"},{"title":"Introspection","icon":"magnifying-glass","href":"/services/introspection"}]},{"group":"Restate Cloud / BYOC / OSS","pages":[{"title":"Choose how to run Restate","sidebarTitle":"Overview","icon":"scale-balanced","href":"/hosting/overview"},{"title":"Restate Cloud","icon":"https://mintlify.s3.us-west-1.amazonaws.com/restate-6d46e1dc/logo/restate-cloud-mini.svg","href":"/cloud/getting-started"},{"group":"Restate BYOC","icon":"/logo/restate-cloud-mini.svg","expanded":false,"pages":[{"title":"Restate BYOC","sidebarTitle":"What is BYOC?","icon":"cloud-arrow-down","href":"/byoc/overview"},{"title":"Installation","sidebarTitle":"Installation","icon":"wrench","href":"/byoc/installation"},{"title":"Security Model","sidebarTitle":"Security","icon":"shield","href":"/byoc/security"}]},{"group":"Self-hosted Restate","icon":"/logo/restate-mini.svg","pages":[{"title":"Self-hosted Restate Overview","sidebarTitle":"Overview","icon":"book-open","href":"/server/overview"},{"group":"Deploy","icon":"box","pages":[{"sidebarTitle":"Kubernetes","icon":"https://mintlify.s3.us-west-1.amazonaws.com/restate-6d46e1dc/img/cloud-providers/kubernetes.svg","title":null,"href":"/server/deploy/kubernetes"},{"group":"Cloud providers","icon":"cloud","pages":[{"title":"Deploying Restate on AWS","sidebarTitle":"AWS","icon":"https://mintlify.s3.us-west-1.amazonaws.com/restate-6d46e1dc/img/cloud-providers/aws.svg","href":"/server/deploy/aws"},{"title":"Deploying Restate on GCP","sidebarTitle":"GCP","icon":"https://mintlify.s3.us-west-1.amazonaws.com/restate-6d46e1dc/img/cloud-providers/gcp.svg","href":"/server/deploy/gcp"},{"title":"Deploying Restate on Azure","sidebarTitle":"Azure","icon":"https://mintlify.s3.us-west-1.amazonaws.com/restate-6d46e1dc/img/cloud-providers/azure.svg","href":"/server/deploy/azure"}]},{"title":"Docker","sidebarTitle":"Docker","icon":"https://mintlify.s3.us-west-1.amazonaws.com/restate-6d46e1dc/img/cloud-providers/docker.svg","href":"/server/deploy/docker"}]},{"group":"Configuration","icon":"gear","pages":[{"title":"Restate Server Configuration","sidebarTitle":"Configuration methods","icon":"sliders","href":"/server/configuration"},{"title":"Memory Configuration","sidebarTitle":"Memory","icon":"memory","href":"/server/memory"},{"title":"Networking","icon":"network-wired","href":"/server/networking"}]},{"group":"Clusters and Data","icon":"cubes-stacked","pages":[{"title":"Highly-Available Clusters","icon":"circle-nodes","href":"/server/clusters"},{"title":"Metadata Storage","icon":"database","href":"/server/metadata"},{"title":"Snapshots \u0026 Backups","icon":"camera","href":"/server/snapshots"}]},{"title":"Security","icon":"shield","href":"/server/security"},{"group":"Monitor","icon":"chart-line","pages":[{"title":"Logging","icon":"file-lines","href":"/server/monitoring/logging"},{"title":"Tracing","icon":"route","href":"/server/monitoring/tracing"},{"title":"Metrics","icon":"chart-simple","href":"/server/monitoring/metrics"}]},{"title":"Upgrading Restate","sidebarTitle":"Upgrading","icon":"arrow-up","href":"/server/upgrading"}]}]},{"group":"References","pages":[{"group":"APIs","expanded":false,"pages":[{"group":"Admin API","pages":[{"group":"deployment","pages":[{"title":"List deployments","deprecated":null,"version":null,"openapi":"/schemas/openapi-admin.json get /deployments","href":"/admin-api/deployment/list-deployments"},{"title":"Register deployment","deprecated":null,"version":null,"openapi":"/schemas/openapi-admin.json post /deployments","href":"/admin-api/deployment/register-deployment"},{"title":"Get deployment","deprecated":null,"version":null,"openapi":"/schemas/openapi-admin.json get /deployments/{deployment}","href":"/admin-api/deployment/get-deployment"},{"title":"Delete deployment","deprecated":null,"version":null,"openapi":"/schemas/openapi-admin.json delete /deployments/{deployment}","href":"/admin-api/deployment/delete-deployment"},{"title":"Update deployment","deprecated":null,"version":null,"openapi":"/schemas/openapi-admin.json patch /deployments/{deployment}","href":"/admin-api/deployment/update-deployment"}]},{"group":"health","pages":[{"title":"Health check endpoint","deprecated":null,"version":null,"openapi":"/schemas/openapi-admin.json get /health","href":"/admin-api/health/health-check-endpoint"}]},{"group":"invocation","pages":[{"title":"Delete an invocation","deprecated":true,"version":null,"openapi":"/schemas/openapi-admin.json delete /invocations/{invocation_id}","href":"/admin-api/invocation/delete-an-invocation"},{"title":"Cancel an invocation","deprecated":null,"version":null,"openapi":"/schemas/openapi-admin.json patch /invocations/{invocation_id}/cancel","href":"/admin-api/invocation/cancel-an-invocation"},{"title":"Kill an invocation","deprecated":null,"version":null,"openapi":"/schemas/openapi-admin.json patch /invocations/{invocation_id}/kill","href":"/admin-api/invocation/kill-an-invocation"},{"title":"Pause an invocation","deprecated":null,"version":null,"openapi":"/schemas/openapi-admin.json patch /invocations/{invocation_id}/pause","href":"/admin-api/invocation/pause-an-invocation"},{"title":"Purge a completed invocation","deprecated":null,"version":null,"openapi":"/schemas/openapi-admin.json patch /invocations/{invocation_id}/purge","href":"/admin-api/invocation/purge-a-completed-invocation"},{"title":"Purge invocation journal","deprecated":null,"version":null,"openapi":"/schemas/openapi-admin.json patch /invocations/{invocation_id}/purge-journal","href":"/admin-api/invocation/purge-invocation-journal"},{"title":"Restart invocation as new","deprecated":null,"version":null,"openapi":"/schemas/openapi-admin.json patch /invocations/{invocation_id}/restart-as-new","href":"/admin-api/invocation/restart-invocation-as-new"},{"title":"Resume an invocation","deprecated":null,"version":null,"openapi":"/schemas/openapi-admin.json patch /invocations/{invocation_id}/resume","href":"/admin-api/invocation/resume-an-invocation"}]},{"group":"kafka_cluster","pages":[{"title":"List Kafka clusters","deprecated":null,"version":null,"openapi":"/schemas/openapi-admin.json get /kafka-clusters","href":"/admin-api/kafka_cluster/list-kafka-clusters"},{"title":"Create Kafka cluster","deprecated":null,"version":null,"openapi":"/schemas/openapi-admin.json post /kafka-clusters","href":"/admin-api/kafka_cluster/create-kafka-cluster"},{"title":"Get Kafka cluster","deprecated":null,"version":null,"openapi":"/schemas/openapi-admin.json get /kafka-clusters/{cluster_name}","href":"/admin-api/kafka_cluster/get-kafka-cluster"},{"title":"Delete Kafka cluster","deprecated":null,"version":null,"openapi":"/schemas/openapi-admin.json delete /kafka-clusters/{cluster_name}","href":"/admin-api/kafka_cluster/delete-kafka-cluster"},{"title":"Update Kafka cluster","deprecated":null,"version":null,"openapi":"/schemas/openapi-admin.json patch /kafka-clusters/{cluster_name}","href":"/admin-api/kafka_cluster/update-kafka-cluster"}]},{"group":"rule","pages":[{"title":"Upsert a batch of rules.","deprecated":null,"version":null,"openapi":"/schemas/openapi-admin.json put /limits/rules","href":"/admin-api/rule/upsert-a-batch-of-rules"},{"title":"Delete a batch of rules by pattern.","deprecated":null,"version":null,"openapi":"/schemas/openapi-admin.json post /limits/rules/bulk-delete","href":"/admin-api/rule/delete-a-batch-of-rules-by-pattern"}]},{"group":"introspection","pages":[{"title":"Query the system and service state by using SQL.","deprecated":null,"version":null,"openapi":"/schemas/openapi-admin.json post /query","href":"/admin-api/introspection/query-the-system-and-service-state-by-using-sql"}]},{"group":"service","pages":[{"title":"List services","deprecated":null,"version":null,"openapi":"/schemas/openapi-admin.json get /services","href":"/admin-api/service/list-services"},{"title":"Get service","deprecated":null,"version":null,"openapi":"/schemas/openapi-admin.json get /services/{service}","href":"/admin-api/service/get-service"},{"title":"Modify service configuration","deprecated":null,"version":null,"openapi":"/schemas/openapi-admin.json patch /services/{service}","href":"/admin-api/service/modify-service-configuration"},{"title":"Get service OpenAPI definition","deprecated":null,"version":null,"openapi":"/schemas/openapi-admin.json get /services/{service}/openapi","href":"/admin-api/service/get-service-openapi-definition"},{"title":"Modify service state","deprecated":null,"version":null,"openapi":"/schemas/openapi-admin.json post /services/{service}/state","href":"/admin-api/service/modify-service-state"}]},{"group":"service_handler","pages":[{"title":"List service handlers","deprecated":null,"version":null,"openapi":"/schemas/openapi-admin.json get /services/{service}/handlers","href":"/admin-api/service_handler/list-service-handlers"},{"title":"Get service handler","deprecated":null,"version":null,"openapi":"/schemas/openapi-admin.json get /services/{service}/handlers/{handler}","href":"/admin-api/service_handler/get-service-handler"}]},{"group":"subscription","pages":[{"title":"List subscriptions","deprecated":null,"version":null,"openapi":"/schemas/openapi-admin.json get /subscriptions","href":"/admin-api/subscription/list-subscriptions"},{"title":"Create subscription","deprecated":null,"version":null,"openapi":"/schemas/openapi-admin.json post /subscriptions","href":"/admin-api/subscription/create-subscription"},{"title":"Get subscription","deprecated":null,"version":null,"openapi":"/schemas/openapi-admin.json get /subscriptions/{subscription}","href":"/admin-api/subscription/get-subscription"},{"title":"Delete subscription","deprecated":null,"version":null,"openapi":"/schemas/openapi-admin.json delete /subscriptions/{subscription}","href":"/admin-api/subscription/delete-subscription"}]},{"group":"version","pages":[{"title":"Get version information","deprecated":null,"version":null,"openapi":"/schemas/openapi-admin.json get /version","href":"/admin-api/version/get-version-information"}]}]},{"title":"Typescript API","url":"https://restatedev.github.io/sdk-typescript/","href":"/references/tsdocs"},{"title":"Javadocs","url":"https://restatedev.github.io/sdk-java/javadocs/","href":"/references/javadocs"},{"title":"KotlinDocs","url":"https://restatedev.github.io/sdk-java/ktdocs/","href":"/references/ktdocs"},{"title":"Go API","url":"https://pkg.go.dev/github.com/restatedev/sdk-go","href":"/references/gopkg"},{"title":"SQL Introspection API","href":"/references/sql-introspection"}]},{"group":"Configuration","expanded":false,"pages":[{"title":"Restate Server Configuration","href":"/references/server-config"},{"title":"CLI Configuration","href":"/references/cli-config"}]},{"title":"Restate Architecture","sidebarTitle":"Architecture","href":"/references/architecture"},{"group":"Changelog","expanded":false,"pages":[{"title":"Restate Server changelog","sidebarTitle":"Restate Server","href":"/changelog/server"},{"title":"TypeScript SDK changelog","sidebarTitle":"TypeScript SDK","href":"/changelog/typescript-sdk"},{"title":"Python SDK changelog","sidebarTitle":"Python SDK","href":"/changelog/python-sdk"},{"title":"Java/Kotlin SDK changelog","sidebarTitle":"Java/Kotlin SDK","href":"/changelog/java-kotlin-sdk"},{"title":"Go SDK changelog","sidebarTitle":"Go SDK","href":"/changelog/go-sdk"},{"title":"Rust SDK changelog","sidebarTitle":"Rust SDK","href":"/changelog/rust-sdk"},{"title":"Kubernetes Operator changelog","sidebarTitle":"Kubernetes Operator","href":"/changelog/operator"}]},{"title":"Error Codes","href":"/references/errors"}]}]},{"tab":"Guides","icon":"book","pages":[{"title":"Guides","href":"/guides"}]},{"tab":"Roadmap","icon":"map","pages":[{"title":"Roadmap","href":"/roadmap/oss"}]},{"tab":"AI / Agents","icon":"robot","pages":[{"title":"AI / Agents","href":"/ai"}]}]},"basePath":"","title":"Spring Boot - Restate","buildId":"dpl_DeHjVRGfFnhYQwHnfC2pjeXXv8h9","deploymentId":"dpl_DeHjVRGfFnhYQwHnfC2pjeXXv8h9","dynamics":[],"chunks":[]}