Creating an HTTP endpoint
- Use either or as SDK dependency.
- Create an endpoint
- Bind one or multiple services to it
- Listen on the specified port (default
9080) for connections and requests.
On JDK 23+, the SDK uses a native library and prints a native-access warning at startup. To silence it, enable native access by passing
--enable-native-access=ALL-UNNAMED as a JVM argument, or by setting Enable-Native-Access: ALL-UNNAMED in your JAR manifest.Creating a Lambda handler
- Use either or as SDK dependency.
- Extend the class
BaseRestateLambdaHandler - Override the register method
- Bind one or multiple services to the builder
Using Java 21 Virtual Threads
Using Java 21 Virtual Threads
If you use a JVM >= 21, you can use virtual threads to run your services: