Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Conversation

@jeremyprime
Copy link
Collaborator

@jeremyprime jeremyprime commented Dec 1, 2025

Summary

Adds a new Spring Boot starter module for Spring Data Valkey that uses Valkey GLIDE by default, plus a spring-boot example demonstrating template and repository usage.

Closes #13.

Features

The starter is based on Spring Boot Starter Data Redis 3.5.1 and provides:

  • Auto-configuration for Valkey GLIDE (default), Lettuce, and Jedis client
  • Support for cluster, SSL, connection pooling, and all Redis features
  • Spring Boot Actuator health indicators and metrics (conditional)
  • DataValkeyTest, Testcontainers, and Docker Compose test support
  • IDE auto-completion support

Implementation

The key changes are in:

  • README.md and MIGRATION.md - Updated spring-data-valkey docs and migration guide to include Spring Boot instructions
  • .github/workflows/* - Updated CI to also build/test the Spring Boot starter
  • examples/spring-boot - Added Spring Boot example showing how to use the starter
  • spring-boot-starter-data-valkey/README.md - Added docs for Spring Boot starter
  • ValkeyGlideConnectionConfiguration.java - Main class for GLIDE support (follows Lettuce/Jedis patterns) - almost all other starter classes are just rebranded copies from the Redis starter
  • ValkeyGlideConnectionFactory.java - Added connection pool executor support

Limitations

The following features are not implemented:

  • Sentinel with GLIDE (use Lettuce or Jedis)
  • Reactive operations with GLIDE (use Lettuce)
  • Client name configuration with GLIDE (use Lettuce or Jedis)

Testing

Completed:

  • spring-data-valkey unit tests
  • spring-boot-starter-data-valkey unit tests
  • spring-boot example and all other examples
  • Manual integration testing/smoke tests
  • PR and Release GitHub actions (PR tests take a couple minutes longer now that they include Spring Boot starter, and release includes both spring-data-valkey and starter artifacts)

What's Next

Organize the repo into a multi-module project (see #37).

Signed-off-by: Jeremy Parr-Pearson <[email protected]>
Signed-off-by: Jeremy Parr-Pearson <[email protected]>
Signed-off-by: Jeremy Parr-Pearson <[email protected]>
Signed-off-by: Jeremy Parr-Pearson <[email protected]>
Signed-off-by: Jeremy Parr-Pearson <[email protected]>
Signed-off-by: Jeremy Parr-Pearson <[email protected]>
Signed-off-by: Jeremy Parr-Pearson <[email protected]>
@jeremyprime jeremyprime force-pushed the spring-boot branch 4 times, most recently from 74608e0 to 808c0e7 Compare December 1, 2025 23:05
Signed-off-by: Jeremy Parr-Pearson <[email protected]>
Signed-off-by: Jeremy Parr-Pearson <[email protected]>
@jeremyprime jeremyprime marked this pull request as ready for review December 2, 2025 22:20
Signed-off-by: Jeremy Parr-Pearson <[email protected]>
Signed-off-by: Jeremy Parr-Pearson <[email protected]>
Signed-off-by: Jeremy Parr-Pearson <[email protected]>
Copy link
Collaborator

@ikolomi ikolomi left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This PR is fairly large. I reviewed the directory structure, the rebranding changes, and the test coverage, and they all seem to match the original Spring Data Redis codebase at tag v3.5.1 exactly. Nice job.

The one major issue I’m scratching my head over is the support for enabling virtual threads via configuration. This required adding a setter for AsyncTaskExecutor on the connection factory, which I deliberately did not provided originaly. In Jedis and Lettuce, AsyncTaskExecutor is used only for cluster configurations.

With valkey-glide, however, this executor is completely ignored. As it stands, adding this configuration provides exactly zero functionality and gives the misleading impression that configuring virtual threads has an effect when using valkey-glide.

I suggest one of the following approaches:

Provide a NO-OP implementation (possibly with a WARN-level log) in the valkeyConnectionFactoryVirtualThreads bean, or

Actually use this executor to invoke .customCommand(...).get() in ClusterGlideClientAdapter and StandaloneGlideClientAdapter.

For the second option, I’d ask you to do a deeper dive to understand the benefit versus the added complexity. I would argue that support for configuring the executor is mostly a nice-to-have, since the original drivers use it only in cluster mode.


- name: Test baseline
run: |
# Install Spring Data Valkey (used by starter)
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

should not the test target come before the install?

Also, why not to split the invocations into the separate steps - i will make life easire in the github UI

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Once we make the project multi-module this can be simplified, for now we need to manually install Spring Data Valkey before we can use the starter as it relies on Spring Data Valkey and the two modules are not connected through a parent module yet.

ikolomi and others added 3 commits December 31, 2025 15:43
First test then install. Also do it in the separate steps
First package (with tests) then install. Do it in separate steps
Signed-off-by: ikolomi <[email protected]>
@ikolomi ikolomi merged commit 24671d7 into valkey-io:main Dec 31, 2025
23 checks passed
@ikolomi
Copy link
Collaborator

ikolomi commented Dec 31, 2025

Merging as is, the virtual threads will be tracked here: #43

@jeremyprime jeremyprime deleted the spring-boot branch January 12, 2026 17:47
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

SpringBoot integration

2 participants