nosan / hazelcast-jpa-demo

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

hazelcast-jpa-demo

Getting started

This sample application demonstrates read-through and write-through functionality of Hazelcast Cloud using spring-data-hazelcast

Please run this app as Spring Boot application.

Change <Token> and <ClusterName> in HazelcastConfig.java (you can get this data from hazelcast-cloud console)

Deploying locally:

gradlew clean bootRun

You may spin-up additional Hazelcast member by deploying in a new terminal and see it forming a cluster. Just make sure to specify another server.port. Default is 8080:

gradlew clean bootRun --args='--server.port=8081'

Sample Calls:

# Yes, all these are GET and is not proper for all the endpoints.

# Add new record
curl -X GET http://localhost:8080/store?id=1&name=Paul&lastname=Esko

# Query a record
curl -X GET http://localhost:8080/query?name=Paul

# Query all
curl -X GET http://localhost:8080/query-all

About


Languages

Language:Java 94.9%Language:Dockerfile 5.1%