Skip to content

hazelcast-guides/spring-boot-sample

Repository files navigation

Spring Boot Application for Hazelcast Cloud

This is an example of how to use Spring Boot with Hazelcast {hazelcast-cloud}.

Tip
For step-by-step instructions of how to run this app, see the tutorial.

Quickstart

  1. Add the required properties to spring-sample/src/main/resources/application.properties:

    • clusterId

    • discoveryToken

    • keyStorePassword

    • trustStorePassword (same as keyStorePassword)

  2. Add the keystore and truststore for your cluster to spring-sample/src/main/resources.

  3. Execute the following to run the sample:

./mvnw spring-boot:run

Internal Hazelcast Developers

If you want to try this application in the UAT or DEV environment, edit the src/main/java/sample/com/hazelcast/demo/cloud/HzCloudDemoApplication.java file to include the environment URL:

// For DEV, use https://test.dev.hazelcast.cloud
config.setProperty("hazelcast.client.cloud.url", "https://uat.hazelcast.cloud");