For the complete documentation index, see llms.txt. This page is also available as Markdown.

Spring Boot Integration

Use GridGain 9 in a Spring Boot application through auto-configuration — Maven setup, client configuration, authentication, and SSL/TLS.

Overview

GridGain provides Spring Boot integration through auto-configuration, making it easy to use GridGain client in your Spring Boot applications. The integration automatically configures an IgniteClient bean that can be injected into your Spring components, allowing you to interact with the GridGain cluster using familiar Spring patterns.

Prerequisites

  • Java 17 or higher

  • Spring Boot 3.0 or higher

    Spring Data 4 is not supported.

  • A running GridGain 9 cluster

Maven Configuration

To use GridGain with Spring Boot, add the following dependencies to your pom.xml:

pom.xml
<repositories>
    <repository>
        <id>GridGain External Repository</id>
        <url>https://www.gridgainsystems.com/nexus/content/repositories/external</url>
    </repository>
</repositories>

<dependencies>
    <dependency>
        <groupId>org.gridgain</groupId>
        <artifactId>spring-boot-starter-ignite-client</artifactId>
        <version>9.1.28</version>
    </dependency>
</dependencies>

The spring-boot-starter-ignite-client is a Spring Boot starter that includes all necessary dependencies and auto-configuration classes.

Basic Configuration

From Application Properties

The simplest way to configure GridGain in your Spring Boot application is through the application.properties file:

The auto-configuration will create an IgniteClient bean that connects to the specified address.

Using the Client

Once configured, you can inject the IgniteClient into your Spring components:

Configuration Properties

The Spring Boot integration supports all GridGain client configuration options through properties. All properties use the ignite.client prefix.

Connection Properties

Property
Type
Description

ignite.client.addresses

String[]

Required. Addresses of GridGain cluster nodes. Can be a comma-separated list.

ignite.client.connectTimeout

Long

Connection timeout in milliseconds. Default value is 5000 ms.

ignite.client.heartbeatInterval

Long

Heartbeat message interval in milliseconds. Default value is 1000 ms.

ignite.client.heartbeatTimeout

Long

Heartbeat message timeout in milliseconds. Default value is 5000 ms.

ignite.client.backgroundReconnectInterval

Long

Background reconnect interval in milliseconds. Default value is 30000 ms.

ignite.client.operationTimeout

Long

Operation timeout in milliseconds. Default value is 0 (no timeout).

Example configuration with all connection properties:

Metrics Configuration

Enable client metrics to monitor connection statistics and performance:

When metrics are enabled, the client will expose metrics that can be monitored using standard Java monitoring tools like JMX or JDK Mission Control.

Authentication

Basic Authentication

If authentication is enabled on your GridGain cluster, you need to configure credentials. GridGain supports basic authentication with username and password.

Configuration File Approach

The simplest way to configure authentication is through properties:

Programmatic Approach

For more control, you can configure authentication programmatically using IgniteClientPropertiesCustomizer:

The programmatic approach takes precedence over property-based configuration. If you define a customizer that sets an authenticator, it will override any authentication properties.

SSL/TLS Configuration

GridGain supports SSL/TLS encryption for client-server communication. Configure SSL through properties:

For detailed information on setting up SSL/TLS on the cluster side, see SSL/TLS documentation.

Setting Up Client

The example below shows how you can set up GridGain integration in your application:

This page is: Copyright © 2026 MariaDB. All rights reserved.

spinner

Last updated

Was this helpful?