Skip to content

jcamp-revc/spring-boot-data-aerospike

 
 

Repository files navigation

Auto configuration for Spring Data Aerospike

Usage

Maven configuration

Add the Maven dependency for reactive repository:

<dependency>
  <groupId>com.aerospike</groupId>
  <artifactId>spring-boot-starter-data-aerospike-reactive</artifactId>
</dependency>

or non-reactive repository:

<dependency>
  <groupId>com.aerospike</groupId>
  <artifactId>spring-boot-starter-data-aerospike</artifactId>
</dependency>

Minimal configuration

Specify Aerospike server hosts and namespace:

spring.aerospike.hosts=aerospike-1-server-ip:3000,aerospike-2-server-ip:3000
spring.data.aerospike.namespace=TEST

Configuration options

All available properties for configuring Aerospike client can be checked in AerospikeProperties.

Properties for configuring spring-data-aerospike can be checked in AerospikeDataProperties.

To disable Aerospike repositories use:

spring.data.aerospike.repositories.type=NONE

Example

You can find usage example in spring-boot-starter-data-aerospike-example module.

Both reactive and sync examples are based on embedded-aerospike dependency usage (which requires docker to be running on the machine). This is the only requirement to be able to run the tests on your machine.

If you want to run the tests in these modules against your Aerospike instance follow the steps:

  1. Update application.properties file with the required Aerospike settings (host, port, namespace). This will point spring-data to your Aerospike instance.

  2. Update with bootstrap.properties file with embedded.containers.enabled=false. This will disable setup of embedded Aerospike.

Releases

No releases published

Packages

No packages published

Languages

  • Java 100.0%