Create spring-boot-data-redis module

This commit is contained in:
Stéphane Nicoll 2025-03-28 14:11:55 +01:00 committed by Andy Wilkinson
parent 95d1d2c70e
commit 81f87b2bc2
73 changed files with 499 additions and 462 deletions

View File

@ -58,6 +58,7 @@ include "spring-boot-project:spring-boot-data-jpa"
include "spring-boot-project:spring-boot-data-ldap" include "spring-boot-project:spring-boot-data-ldap"
include "spring-boot-project:spring-boot-data-mongodb" include "spring-boot-project:spring-boot-data-mongodb"
include "spring-boot-project:spring-boot-data-neo4j" include "spring-boot-project:spring-boot-data-neo4j"
include "spring-boot-project:spring-boot-data-redis"
include "spring-boot-project:spring-boot-dependencies" include "spring-boot-project:spring-boot-dependencies"
include "spring-boot-project:spring-boot-devtools" include "spring-boot-project:spring-boot-devtools"
include "spring-boot-project:spring-boot-docker-compose" include "spring-boot-project:spring-boot-docker-compose"

View File

@ -26,6 +26,7 @@ dependencies {
optional(project(":spring-boot-project:spring-boot-data-jpa")) optional(project(":spring-boot-project:spring-boot-data-jpa"))
optional(project(":spring-boot-project:spring-boot-data-mongodb")) optional(project(":spring-boot-project:spring-boot-data-mongodb"))
optional(project(":spring-boot-project:spring-boot-data-neo4j")) optional(project(":spring-boot-project:spring-boot-data-neo4j"))
optional(project(":spring-boot-project:spring-boot-data-redis"))
optional(project(":spring-boot-project:spring-boot-flyway")) optional(project(":spring-boot-project:spring-boot-flyway"))
optional(project(":spring-boot-project:spring-boot-hazelcast")) optional(project(":spring-boot-project:spring-boot-hazelcast"))
optional(project(":spring-boot-project:spring-boot-http")) optional(project(":spring-boot-project:spring-boot-http"))

View File

@ -26,7 +26,6 @@ import org.springframework.boot.autoconfigure.EnableAutoConfiguration;
import org.springframework.boot.autoconfigure.condition.ConditionalOnBean; import org.springframework.boot.autoconfigure.condition.ConditionalOnBean;
import org.springframework.boot.autoconfigure.condition.ConditionalOnClass; import org.springframework.boot.autoconfigure.condition.ConditionalOnClass;
import org.springframework.boot.autoconfigure.condition.ConditionalOnMissingBean; import org.springframework.boot.autoconfigure.condition.ConditionalOnMissingBean;
import org.springframework.boot.autoconfigure.data.redis.RedisAutoConfiguration;
import org.springframework.context.annotation.Bean; import org.springframework.context.annotation.Bean;
import org.springframework.data.redis.connection.RedisConnectionFactory; import org.springframework.data.redis.connection.RedisConnectionFactory;
@ -39,7 +38,8 @@ import org.springframework.data.redis.connection.RedisConnectionFactory;
* @author Mark Paluch * @author Mark Paluch
* @since 2.1.0 * @since 2.1.0
*/ */
@AutoConfiguration(after = { RedisAutoConfiguration.class, RedisReactiveHealthContributorAutoConfiguration.class }) @AutoConfiguration(after = RedisReactiveHealthContributorAutoConfiguration.class,
afterName = "org.springframework.boot.data.redis.autoconfigure.RedisAutoConfiguration")
@ConditionalOnClass(RedisConnectionFactory.class) @ConditionalOnClass(RedisConnectionFactory.class)
@ConditionalOnBean(RedisConnectionFactory.class) @ConditionalOnBean(RedisConnectionFactory.class)
@ConditionalOnEnabledHealthIndicator("redis") @ConditionalOnEnabledHealthIndicator("redis")

View File

@ -28,7 +28,6 @@ import org.springframework.boot.autoconfigure.EnableAutoConfiguration;
import org.springframework.boot.autoconfigure.condition.ConditionalOnBean; import org.springframework.boot.autoconfigure.condition.ConditionalOnBean;
import org.springframework.boot.autoconfigure.condition.ConditionalOnClass; import org.springframework.boot.autoconfigure.condition.ConditionalOnClass;
import org.springframework.boot.autoconfigure.condition.ConditionalOnMissingBean; import org.springframework.boot.autoconfigure.condition.ConditionalOnMissingBean;
import org.springframework.boot.autoconfigure.data.redis.RedisReactiveAutoConfiguration;
import org.springframework.context.annotation.Bean; import org.springframework.context.annotation.Bean;
import org.springframework.data.redis.connection.ReactiveRedisConnectionFactory; import org.springframework.data.redis.connection.ReactiveRedisConnectionFactory;
@ -42,7 +41,7 @@ import org.springframework.data.redis.connection.ReactiveRedisConnectionFactory;
* @author Mark Paluch * @author Mark Paluch
* @since 2.1.0 * @since 2.1.0
*/ */
@AutoConfiguration(after = RedisReactiveAutoConfiguration.class) @AutoConfiguration(afterName = "org.springframework.boot.data.redis.autoconfigure.RedisReactiveAutoConfiguration")
@ConditionalOnClass({ ReactiveRedisConnectionFactory.class, Flux.class }) @ConditionalOnClass({ ReactiveRedisConnectionFactory.class, Flux.class })
@ConditionalOnBean(ReactiveRedisConnectionFactory.class) @ConditionalOnBean(ReactiveRedisConnectionFactory.class)
@ConditionalOnEnabledHealthIndicator("redis") @ConditionalOnEnabledHealthIndicator("redis")

View File

@ -1,5 +1,5 @@
/* /*
* Copyright 2012-2022 the original author or authors. * Copyright 2012-2025 the original author or authors.
* *
* Licensed under the Apache License, Version 2.0 (the "License"); * Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License. * you may not use this file except in compliance with the License.
@ -27,8 +27,7 @@ import org.springframework.boot.autoconfigure.AutoConfiguration;
import org.springframework.boot.autoconfigure.condition.ConditionalOnBean; import org.springframework.boot.autoconfigure.condition.ConditionalOnBean;
import org.springframework.boot.autoconfigure.condition.ConditionalOnClass; import org.springframework.boot.autoconfigure.condition.ConditionalOnClass;
import org.springframework.boot.autoconfigure.condition.ConditionalOnMissingBean; import org.springframework.boot.autoconfigure.condition.ConditionalOnMissingBean;
import org.springframework.boot.autoconfigure.data.redis.ClientResourcesBuilderCustomizer; import org.springframework.boot.data.redis.autoconfigure.ClientResourcesBuilderCustomizer;
import org.springframework.boot.autoconfigure.data.redis.RedisAutoConfiguration;
import org.springframework.context.annotation.Bean; import org.springframework.context.annotation.Bean;
/** /**
@ -38,9 +37,10 @@ import org.springframework.context.annotation.Bean;
* @author Yanming Zhou * @author Yanming Zhou
* @since 2.6.0 * @since 2.6.0
*/ */
@AutoConfiguration(before = RedisAutoConfiguration.class, @AutoConfiguration(beforeName = "org.springframework.boot.data.redis.autoconfigure.RedisAutoConfiguration",
after = { MetricsAutoConfiguration.class, CompositeMeterRegistryAutoConfiguration.class }) after = { MetricsAutoConfiguration.class, CompositeMeterRegistryAutoConfiguration.class })
@ConditionalOnClass({ RedisClient.class, MicrometerCommandLatencyRecorder.class }) @ConditionalOnClass({ ClientResourcesBuilderCustomizer.class, RedisClient.class,
MicrometerCommandLatencyRecorder.class })
@ConditionalOnBean(MeterRegistry.class) @ConditionalOnBean(MeterRegistry.class)
public class LettuceMetricsAutoConfiguration { public class LettuceMetricsAutoConfiguration {

View File

@ -1,5 +1,5 @@
/* /*
* Copyright 2012-2023 the original author or authors. * Copyright 2012-2025 the original author or authors.
* *
* Licensed under the Apache License, Version 2.0 (the "License"); * Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License. * you may not use this file except in compliance with the License.
@ -22,7 +22,7 @@ import org.springframework.boot.actuate.autoconfigure.health.HealthContributorAu
import org.springframework.boot.actuate.data.redis.RedisHealthIndicator; import org.springframework.boot.actuate.data.redis.RedisHealthIndicator;
import org.springframework.boot.actuate.data.redis.RedisReactiveHealthIndicator; import org.springframework.boot.actuate.data.redis.RedisReactiveHealthIndicator;
import org.springframework.boot.autoconfigure.AutoConfigurations; import org.springframework.boot.autoconfigure.AutoConfigurations;
import org.springframework.boot.autoconfigure.data.redis.RedisAutoConfiguration; import org.springframework.boot.data.redis.autoconfigure.RedisAutoConfiguration;
import org.springframework.boot.test.context.runner.ApplicationContextRunner; import org.springframework.boot.test.context.runner.ApplicationContextRunner;
import org.springframework.boot.testsupport.classpath.ClassPathExclusions; import org.springframework.boot.testsupport.classpath.ClassPathExclusions;

View File

@ -1,5 +1,5 @@
/* /*
* Copyright 2012-2023 the original author or authors. * Copyright 2012-2025 the original author or authors.
* *
* Licensed under the Apache License, Version 2.0 (the "License"); * Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License. * you may not use this file except in compliance with the License.
@ -22,7 +22,7 @@ import org.springframework.boot.actuate.autoconfigure.health.HealthContributorAu
import org.springframework.boot.actuate.data.redis.RedisHealthIndicator; import org.springframework.boot.actuate.data.redis.RedisHealthIndicator;
import org.springframework.boot.actuate.data.redis.RedisReactiveHealthIndicator; import org.springframework.boot.actuate.data.redis.RedisReactiveHealthIndicator;
import org.springframework.boot.autoconfigure.AutoConfigurations; import org.springframework.boot.autoconfigure.AutoConfigurations;
import org.springframework.boot.autoconfigure.data.redis.RedisAutoConfiguration; import org.springframework.boot.data.redis.autoconfigure.RedisAutoConfiguration;
import org.springframework.boot.test.context.runner.ApplicationContextRunner; import org.springframework.boot.test.context.runner.ApplicationContextRunner;
import static org.assertj.core.api.Assertions.assertThat; import static org.assertj.core.api.Assertions.assertThat;

View File

@ -24,8 +24,6 @@ import org.springframework.boot.actuate.autoconfigure.tracing.OpenTelemetryTraci
import org.springframework.boot.actuate.health.HealthEndpointWebExtension; import org.springframework.boot.actuate.health.HealthEndpointWebExtension;
import org.springframework.boot.actuate.health.ReactiveHealthEndpointWebExtension; import org.springframework.boot.actuate.health.ReactiveHealthEndpointWebExtension;
import org.springframework.boot.autoconfigure.EnableAutoConfiguration; import org.springframework.boot.autoconfigure.EnableAutoConfiguration;
import org.springframework.boot.autoconfigure.data.redis.RedisAutoConfiguration;
import org.springframework.boot.autoconfigure.data.redis.RedisRepositoriesAutoConfiguration;
import org.springframework.boot.autoconfigure.data.rest.RepositoryRestMvcAutoConfiguration; import org.springframework.boot.autoconfigure.data.rest.RepositoryRestMvcAutoConfiguration;
import org.springframework.boot.cassandra.autoconfigure.CassandraAutoConfiguration; import org.springframework.boot.cassandra.autoconfigure.CassandraAutoConfiguration;
import org.springframework.boot.context.annotation.UserConfigurations; import org.springframework.boot.context.annotation.UserConfigurations;
@ -35,6 +33,8 @@ import org.springframework.boot.data.mongodb.autoconfigure.MongoDataAutoConfigur
import org.springframework.boot.data.mongodb.autoconfigure.MongoReactiveDataAutoConfiguration; import org.springframework.boot.data.mongodb.autoconfigure.MongoReactiveDataAutoConfiguration;
import org.springframework.boot.data.neo4j.autoconfigure.Neo4jDataAutoConfiguration; import org.springframework.boot.data.neo4j.autoconfigure.Neo4jDataAutoConfiguration;
import org.springframework.boot.data.neo4j.autoconfigure.Neo4jReactiveDataAutoConfiguration; import org.springframework.boot.data.neo4j.autoconfigure.Neo4jReactiveDataAutoConfiguration;
import org.springframework.boot.data.redis.autoconfigure.RedisAutoConfiguration;
import org.springframework.boot.data.redis.autoconfigure.RedisRepositoriesAutoConfiguration;
import org.springframework.boot.flyway.autoconfigure.FlywayAutoConfiguration; import org.springframework.boot.flyway.autoconfigure.FlywayAutoConfiguration;
import org.springframework.boot.hazelcast.autoconfigure.HazelcastAutoConfiguration; import org.springframework.boot.hazelcast.autoconfigure.HazelcastAutoConfiguration;
import org.springframework.boot.liquibase.autoconfigure.LiquibaseAutoConfiguration; import org.springframework.boot.liquibase.autoconfigure.LiquibaseAutoConfiguration;

View File

@ -1,5 +1,5 @@
/* /*
* Copyright 2012-2023 the original author or authors. * Copyright 2012-2025 the original author or authors.
* *
* Licensed under the Apache License, Version 2.0 (the "License"); * Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License. * you may not use this file except in compliance with the License.
@ -23,7 +23,7 @@ import org.junit.jupiter.api.Test;
import org.springframework.boot.actuate.autoconfigure.metrics.test.MetricsRun; import org.springframework.boot.actuate.autoconfigure.metrics.test.MetricsRun;
import org.springframework.boot.autoconfigure.AutoConfigurations; import org.springframework.boot.autoconfigure.AutoConfigurations;
import org.springframework.boot.autoconfigure.data.redis.RedisAutoConfiguration; import org.springframework.boot.data.redis.autoconfigure.RedisAutoConfiguration;
import org.springframework.boot.test.context.runner.ApplicationContextRunner; import org.springframework.boot.test.context.runner.ApplicationContextRunner;
import org.springframework.context.annotation.Bean; import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration; import org.springframework.context.annotation.Configuration;

View File

@ -26,6 +26,7 @@ dependencies {
optional(project(":spring-boot-project:spring-boot-activemq")) optional(project(":spring-boot-project:spring-boot-activemq"))
optional(project(":spring-boot-project:spring-boot-data-cassandra")) optional(project(":spring-boot-project:spring-boot-data-cassandra"))
optional(project(":spring-boot-project:spring-boot-data-redis"))
optional(project(":spring-boot-project:spring-boot-flyway")) optional(project(":spring-boot-project:spring-boot-flyway"))
optional(project(":spring-boot-project:spring-boot-http")) optional(project(":spring-boot-project:spring-boot-http"))
optional(project(":spring-boot-project:spring-boot-integration")) optional(project(":spring-boot-project:spring-boot-integration"))

View File

@ -1,5 +1,5 @@
/* /*
* Copyright 2012-2024 the original author or authors. * Copyright 2012-2025 the original author or authors.
* *
* Licensed under the Apache License, Version 2.0 (the "License"); * Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License. * you may not use this file except in compliance with the License.
@ -29,7 +29,7 @@ import org.testcontainers.junit.jupiter.Testcontainers;
import org.springframework.boot.autoconfigure.AutoConfigurations; import org.springframework.boot.autoconfigure.AutoConfigurations;
import org.springframework.boot.autoconfigure.cache.CacheAutoConfiguration; import org.springframework.boot.autoconfigure.cache.CacheAutoConfiguration;
import org.springframework.boot.autoconfigure.data.redis.RedisAutoConfiguration; import org.springframework.boot.data.redis.autoconfigure.RedisAutoConfiguration;
import org.springframework.boot.test.context.assertj.AssertableApplicationContext; import org.springframework.boot.test.context.assertj.AssertableApplicationContext;
import org.springframework.boot.test.context.runner.ApplicationContextRunner; import org.springframework.boot.test.context.runner.ApplicationContextRunner;
import org.springframework.boot.test.context.runner.ContextConsumer; import org.springframework.boot.test.context.runner.ContextConsumer;

View File

@ -43,6 +43,7 @@ dependencies {
optional(project(":spring-boot-project:spring-boot-couchbase")) optional(project(":spring-boot-project:spring-boot-couchbase"))
optional(project(":spring-boot-project:spring-boot-data-jpa")) optional(project(":spring-boot-project:spring-boot-data-jpa"))
optional(project(":spring-boot-project:spring-boot-data-mongodb")) optional(project(":spring-boot-project:spring-boot-data-mongodb"))
optional(project(":spring-boot-project:spring-boot-data-redis"))
optional(project(":spring-boot-project:spring-boot-flyway")) optional(project(":spring-boot-project:spring-boot-flyway"))
optional(project(":spring-boot-project:spring-boot-h2console")) optional(project(":spring-boot-project:spring-boot-h2console"))
optional(project(":spring-boot-project:spring-boot-hazelcast")) optional(project(":spring-boot-project:spring-boot-hazelcast"))
@ -158,7 +159,6 @@ dependencies {
optional("org.springframework.data:spring-data-jdbc") optional("org.springframework.data:spring-data-jdbc")
optional("org.springframework.data:spring-data-mongodb") optional("org.springframework.data:spring-data-mongodb")
optional("org.springframework.data:spring-data-r2dbc") optional("org.springframework.data:spring-data-r2dbc")
optional("org.springframework.data:spring-data-redis")
optional("org.springframework.graphql:spring-graphql") optional("org.springframework.graphql:spring-graphql")
optional("org.springframework.hateoas:spring-hateoas") optional("org.springframework.hateoas:spring-hateoas")
optional("org.springframework.security:spring-security-acl") optional("org.springframework.security:spring-security-acl")
@ -183,7 +183,6 @@ dependencies {
optional("org.springframework.session:spring-session-jdbc") optional("org.springframework.session:spring-session-jdbc")
optional("org.springframework.amqp:spring-rabbit") optional("org.springframework.amqp:spring-rabbit")
optional("org.springframework.amqp:spring-rabbit-stream") optional("org.springframework.amqp:spring-rabbit-stream")
optional("redis.clients:jedis")
testImplementation(project(":spring-boot-project:spring-boot-freemarker")) testImplementation(project(":spring-boot-project:spring-boot-freemarker"))
testImplementation(project(":spring-boot-project:spring-boot-gson")) testImplementation(project(":spring-boot-project:spring-boot-gson"))

View File

@ -1,5 +1,5 @@
/* /*
* Copyright 2012-2024 the original author or authors. * Copyright 2012-2025 the original author or authors.
* *
* Licensed under the Apache License, Version 2.0 (the "License"); * Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License. * you may not use this file except in compliance with the License.
@ -27,10 +27,10 @@ import org.testcontainers.junit.jupiter.Testcontainers;
import reactor.core.publisher.Mono; import reactor.core.publisher.Mono;
import org.springframework.boot.autoconfigure.AutoConfigurations; import org.springframework.boot.autoconfigure.AutoConfigurations;
import org.springframework.boot.autoconfigure.data.redis.RedisAutoConfiguration;
import org.springframework.boot.autoconfigure.data.redis.RedisReactiveAutoConfiguration;
import org.springframework.boot.autoconfigure.web.ServerProperties; import org.springframework.boot.autoconfigure.web.ServerProperties;
import org.springframework.boot.autoconfigure.web.reactive.WebSessionIdResolverAutoConfiguration; import org.springframework.boot.autoconfigure.web.reactive.WebSessionIdResolverAutoConfiguration;
import org.springframework.boot.data.redis.autoconfigure.RedisAutoConfiguration;
import org.springframework.boot.data.redis.autoconfigure.RedisReactiveAutoConfiguration;
import org.springframework.boot.test.context.FilteredClassLoader; import org.springframework.boot.test.context.FilteredClassLoader;
import org.springframework.boot.test.context.assertj.AssertableReactiveWebApplicationContext; import org.springframework.boot.test.context.assertj.AssertableReactiveWebApplicationContext;
import org.springframework.boot.test.context.runner.ContextConsumer; import org.springframework.boot.test.context.runner.ContextConsumer;

View File

@ -1,5 +1,5 @@
/* /*
* Copyright 2012-2024 the original author or authors. * Copyright 2012-2025 the original author or authors.
* *
* Licensed under the Apache License, Version 2.0 (the "License"); * Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License. * you may not use this file except in compliance with the License.
@ -25,9 +25,9 @@ import org.testcontainers.junit.jupiter.Container;
import org.testcontainers.junit.jupiter.Testcontainers; import org.testcontainers.junit.jupiter.Testcontainers;
import org.springframework.boot.autoconfigure.AutoConfigurations; import org.springframework.boot.autoconfigure.AutoConfigurations;
import org.springframework.boot.autoconfigure.data.redis.RedisAutoConfiguration;
import org.springframework.boot.autoconfigure.web.ServerProperties; import org.springframework.boot.autoconfigure.web.ServerProperties;
import org.springframework.boot.context.properties.source.InvalidConfigurationPropertyValueException; import org.springframework.boot.context.properties.source.InvalidConfigurationPropertyValueException;
import org.springframework.boot.data.redis.autoconfigure.RedisAutoConfiguration;
import org.springframework.boot.test.context.FilteredClassLoader; import org.springframework.boot.test.context.FilteredClassLoader;
import org.springframework.boot.test.context.assertj.AssertableWebApplicationContext; import org.springframework.boot.test.context.assertj.AssertableWebApplicationContext;
import org.springframework.boot.test.context.runner.ContextConsumer; import org.springframework.boot.test.context.runner.ContextConsumer;

View File

@ -26,7 +26,6 @@ import org.springframework.boot.autoconfigure.condition.ConditionalOnBean;
import org.springframework.boot.autoconfigure.condition.ConditionalOnClass; import org.springframework.boot.autoconfigure.condition.ConditionalOnClass;
import org.springframework.boot.autoconfigure.condition.ConditionalOnMissingBean; import org.springframework.boot.autoconfigure.condition.ConditionalOnMissingBean;
import org.springframework.boot.autoconfigure.data.couchbase.CouchbaseDataAutoConfiguration; import org.springframework.boot.autoconfigure.data.couchbase.CouchbaseDataAutoConfiguration;
import org.springframework.boot.autoconfigure.data.redis.RedisAutoConfiguration;
import org.springframework.boot.context.properties.EnableConfigurationProperties; import org.springframework.boot.context.properties.EnableConfigurationProperties;
import org.springframework.boot.jpa.autoconfigure.EntityManagerFactoryDependsOnPostProcessor; import org.springframework.boot.jpa.autoconfigure.EntityManagerFactoryDependsOnPostProcessor;
import org.springframework.cache.CacheManager; import org.springframework.cache.CacheManager;
@ -52,8 +51,9 @@ import org.springframework.util.Assert;
* @since 1.3.0 * @since 1.3.0
* @see EnableCaching * @see EnableCaching
*/ */
@AutoConfiguration(after = { CouchbaseDataAutoConfiguration.class, RedisAutoConfiguration.class }, @AutoConfiguration(after = CouchbaseDataAutoConfiguration.class,
afterName = { "org.springframework.boot.hazelcast.autoconfigure.HazelcastAutoConfiguration", afterName = { "org.springframework.boot.data.redis.autoconfigure.RedisAutoConfiguration",
"org.springframework.boot.hazelcast.autoconfigure.HazelcastAutoConfiguration",
"org.springframework.boot.jpa.autoconfigure.hibernate.HibernateJpaAutoConfiguration" }) "org.springframework.boot.jpa.autoconfigure.hibernate.HibernateJpaAutoConfiguration" })
@ConditionalOnClass(CacheManager.class) @ConditionalOnClass(CacheManager.class)
@ConditionalOnBean(CacheAspectSupport.class) @ConditionalOnBean(CacheAspectSupport.class)

View File

@ -1,5 +1,5 @@
/* /*
* Copyright 2012-2023 the original author or authors. * Copyright 2012-2025 the original author or authors.
* *
* Licensed under the Apache License, Version 2.0 (the "License"); * Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License. * you may not use this file except in compliance with the License.
@ -25,7 +25,6 @@ import org.springframework.boot.autoconfigure.cache.CacheProperties.Redis;
import org.springframework.boot.autoconfigure.condition.ConditionalOnBean; import org.springframework.boot.autoconfigure.condition.ConditionalOnBean;
import org.springframework.boot.autoconfigure.condition.ConditionalOnClass; import org.springframework.boot.autoconfigure.condition.ConditionalOnClass;
import org.springframework.boot.autoconfigure.condition.ConditionalOnMissingBean; import org.springframework.boot.autoconfigure.condition.ConditionalOnMissingBean;
import org.springframework.boot.autoconfigure.data.redis.RedisAutoConfiguration;
import org.springframework.cache.CacheManager; import org.springframework.cache.CacheManager;
import org.springframework.context.annotation.Bean; import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Conditional; import org.springframework.context.annotation.Conditional;
@ -46,7 +45,7 @@ import org.springframework.data.redis.serializer.RedisSerializationContext.Seria
*/ */
@Configuration(proxyBeanMethods = false) @Configuration(proxyBeanMethods = false)
@ConditionalOnClass(RedisConnectionFactory.class) @ConditionalOnClass(RedisConnectionFactory.class)
@AutoConfigureAfter(RedisAutoConfiguration.class) @AutoConfigureAfter(name = "org.springframework.boot.data.redis.autoconfigure.RedisAutoConfiguration")
@ConditionalOnBean(RedisConnectionFactory.class) @ConditionalOnBean(RedisConnectionFactory.class)
@ConditionalOnMissingBean(CacheManager.class) @ConditionalOnMissingBean(CacheManager.class)
@Conditional(CacheCondition.class) @Conditional(CacheCondition.class)

View File

@ -27,8 +27,6 @@ import org.springframework.boot.autoconfigure.condition.ConditionalOnClass;
import org.springframework.boot.autoconfigure.condition.ConditionalOnMissingBean; import org.springframework.boot.autoconfigure.condition.ConditionalOnMissingBean;
import org.springframework.boot.autoconfigure.condition.ConditionalOnWebApplication; import org.springframework.boot.autoconfigure.condition.ConditionalOnWebApplication;
import org.springframework.boot.autoconfigure.condition.ConditionalOnWebApplication.Type; import org.springframework.boot.autoconfigure.condition.ConditionalOnWebApplication.Type;
import org.springframework.boot.autoconfigure.data.redis.RedisAutoConfiguration;
import org.springframework.boot.autoconfigure.data.redis.RedisReactiveAutoConfiguration;
import org.springframework.boot.autoconfigure.web.ServerProperties; import org.springframework.boot.autoconfigure.web.ServerProperties;
import org.springframework.boot.autoconfigure.web.reactive.HttpHandlerAutoConfiguration; import org.springframework.boot.autoconfigure.web.reactive.HttpHandlerAutoConfiguration;
import org.springframework.boot.autoconfigure.web.reactive.WebFluxAutoConfiguration; import org.springframework.boot.autoconfigure.web.reactive.WebFluxAutoConfiguration;
@ -63,14 +61,14 @@ import org.springframework.session.web.http.HttpSessionIdResolver;
* @author Weix Sun * @author Weix Sun
* @since 1.4.0 * @since 1.4.0
*/ */
@AutoConfiguration( @AutoConfiguration(after = WebSessionIdResolverAutoConfiguration.class,
after = { RedisAutoConfiguration.class, RedisReactiveAutoConfiguration.class,
WebSessionIdResolverAutoConfiguration.class },
afterName = { "org.springframework.boot.hazelcast.autoconfigure.HazelcastAutoConfiguration", afterName = { "org.springframework.boot.hazelcast.autoconfigure.HazelcastAutoConfiguration",
"org.springframework.boot.jdbc.autoconfigure.DataSourceAutoConfiguration", "org.springframework.boot.jdbc.autoconfigure.DataSourceAutoConfiguration",
"org.springframework.boot.jdbc.autoconfigure.JdbcTemplateAutoConfiguration", "org.springframework.boot.jdbc.autoconfigure.JdbcTemplateAutoConfiguration",
"org.springframework.boot.data.mongodb.autoconfigure.MongoDataAutoConfiguration", "org.springframework.boot.data.mongodb.autoconfigure.MongoDataAutoConfiguration",
"org.springframework.boot.data.mongodb.autoconfigure.MongoReactiveDataAutoConfiguration" }, "org.springframework.boot.data.mongodb.autoconfigure.MongoReactiveDataAutoConfiguration",
"org.springframework.boot.data.redis.autoconfigure.RedisAutoConfiguration",
"org.springframework.boot.data.redis.autoconfigure.RedisReactiveAutoConfiguration" },
before = { HttpHandlerAutoConfiguration.class, WebFluxAutoConfiguration.class }) before = { HttpHandlerAutoConfiguration.class, WebFluxAutoConfiguration.class })
@ConditionalOnClass(Session.class) @ConditionalOnClass(Session.class)
@ConditionalOnWebApplication @ConditionalOnWebApplication

View File

@ -44,20 +44,6 @@
"description": "Whether to enable R2DBC repositories.", "description": "Whether to enable R2DBC repositories.",
"defaultValue": true "defaultValue": true
}, },
{
"name": "spring.data.redis.repositories.enabled",
"type": "java.lang.Boolean",
"description": "Whether to enable Redis repositories.",
"defaultValue": true
},
{
"name": "spring.data.redis.ssl",
"type": "java.lang.Boolean",
"deprecation": {
"replacement": "spring.data.redis.ssl.enabled",
"level": "error"
}
},
{ {
"name": "spring.graphql.schema.file-extensions", "name": "spring.graphql.schema.file-extensions",
"defaultValue": ".graphqls,.gqls" "defaultValue": ".graphqls,.gqls"
@ -294,258 +280,6 @@
"replacement": "spring.reactor.debug-agent.enabled" "replacement": "spring.reactor.debug-agent.enabled"
} }
}, },
{
"name": "spring.redis.client-name",
"type": "java.lang.String",
"deprecation": {
"replacement": "spring.data.redis.client-name",
"level": "error"
}
},
{
"name": "spring.redis.client-type",
"type": "org.springframework.boot.autoconfigure.data.redis.RedisProperties$ClientType",
"deprecation": {
"replacement": "spring.data.redis.client-type",
"level": "error"
}
},
{
"name": "spring.redis.cluster.max-redirects",
"type": "java.lang.Integer",
"deprecation": {
"replacement": "spring.data.redis.cluster.max-redirects",
"level": "error"
}
},
{
"name": "spring.redis.cluster.nodes",
"type": "java.util.List<java.lang.String>",
"deprecation": {
"replacement": "spring.data.redis.cluster.nodes",
"level": "error"
}
},
{
"name": "spring.redis.connect-timeout",
"type": "java.time.Duration",
"deprecation": {
"replacement": "spring.data.redis.connect-timeout",
"level": "error"
}
},
{
"name": "spring.redis.database",
"type": "java.lang.Integer",
"deprecation": {
"replacement": "spring.data.redis.database",
"level": "error"
}
},
{
"name": "spring.redis.host",
"type": "java.lang.String",
"deprecation": {
"replacement": "spring.data.redis.host",
"level": "error"
}
},
{
"name": "spring.redis.jedis.pool.enabled",
"type": "java.lang.Boolean",
"deprecation": {
"level": "error"
}
},
{
"name": "spring.redis.jedis.pool.max-active",
"type": "java.lang.Integer",
"deprecation": {
"level": "error"
}
},
{
"name": "spring.redis.jedis.pool.max-idle",
"type": "java.lang.Integer",
"deprecation": {
"level": "error"
}
},
{
"name": "spring.redis.jedis.pool.max-wait",
"type": "java.time.Duration",
"deprecation": {
"level": "error"
}
},
{
"name": "spring.redis.jedis.pool.min-idle",
"type": "java.lang.Integer",
"deprecation": {
"level": "error"
}
},
{
"name": "spring.redis.jedis.pool.time-between-eviction-runs",
"type": "java.time.Duration",
"deprecation": {
"level": "error"
}
},
{
"name": "spring.redis.lettuce.cluster.refresh.adaptive",
"type": "java.lang.Boolean",
"deprecation": {
"replacement": "spring.data.redis.lettuce.cluster.refresh.adaptive",
"level": "error"
}
},
{
"name": "spring.redis.lettuce.cluster.refresh.dynamic-refresh-sources",
"type": "java.lang.Boolean",
"deprecation": {
"replacement": "spring.data.redis.lettuce.cluster.refresh.dynamic-refresh-sources",
"level": "error"
}
},
{
"name": "spring.redis.lettuce.cluster.refresh.period",
"type": "java.time.Duration",
"deprecation": {
"replacement": "spring.data.redis.lettuce.cluster.refresh.period",
"level": "error"
}
},
{
"name": "spring.redis.lettuce.pool.enabled",
"type": "java.lang.Boolean",
"deprecation": {
"level": "error"
}
},
{
"name": "spring.redis.lettuce.pool.max-active",
"type": "java.lang.Integer",
"deprecation": {
"level": "error"
}
},
{
"name": "spring.redis.lettuce.pool.max-idle",
"type": "java.lang.Integer",
"deprecation": {
"level": "error"
}
},
{
"name": "spring.redis.lettuce.pool.max-wait",
"type": "java.time.Duration",
"deprecation": {
"level": "error"
}
},
{
"name": "spring.redis.lettuce.pool.min-idle",
"type": "java.lang.Integer",
"deprecation": {
"level": "error"
}
},
{
"name": "spring.redis.lettuce.pool.time-between-eviction-runs",
"type": "java.time.Duration",
"deprecation": {
"level": "error"
}
},
{
"name": "spring.redis.lettuce.shutdown-timeout",
"type": "java.time.Duration",
"deprecation": {
"replacement": "spring.data.redis.lettuce.shutdown-timeout",
"level": "error"
}
},
{
"name": "spring.redis.password",
"type": "java.lang.String",
"deprecation": {
"replacement": "spring.data.redis.password",
"level": "error"
}
},
{
"name": "spring.redis.port",
"type": "java.lang.Integer",
"deprecation": {
"replacement": "spring.data.redis.port",
"level": "error"
}
},
{
"name": "spring.redis.sentinel.master",
"type": "java.lang.String",
"deprecation": {
"replacement": "spring.data.redis.sentinel.master",
"level": "error"
}
},
{
"name": "spring.redis.sentinel.nodes",
"type": "java.util.List<java.lang.String>",
"deprecation": {
"replacement": "spring.data.redis.sentinel.nodes",
"level": "error"
}
},
{
"name": "spring.redis.sentinel.password",
"type": "java.lang.String",
"deprecation": {
"replacement": "spring.data.redis.sentinel.password",
"level": "error"
}
},
{
"name": "spring.redis.sentinel.username",
"type": "java.lang.String",
"deprecation": {
"replacement": "spring.data.redis.sentinel.username",
"level": "error"
}
},
{
"name": "spring.redis.ssl",
"type": "java.lang.Boolean",
"deprecation": {
"replacement": "spring.data.redis.ssl",
"level": "error"
}
},
{
"name": "spring.redis.timeout",
"type": "java.time.Duration",
"deprecation": {
"replacement": "spring.data.redis.timeout",
"level": "error"
}
},
{
"name": "spring.redis.url",
"type": "java.lang.String",
"deprecation": {
"replacement": "spring.data.redis.url",
"level": "error"
}
},
{
"name": "spring.redis.username",
"type": "java.lang.String",
"deprecation": {
"replacement": "spring.data.redis.username",
"level": "error"
}
},
{ {
"name": "spring.resources.add-mappings", "name": "spring.resources.add-mappings",
"type": "java.lang.Boolean", "type": "java.lang.Boolean",
@ -816,52 +550,6 @@
} }
] ]
}, },
{
"name": "spring.data.redis.lettuce.read-from",
"values": [
{
"value": "any",
"description": "Read from any node."
},
{
"value": "any-replica",
"description": "Read from any replica node."
},
{
"value": "lowest-latency",
"description": "Read from the node with the lowest latency during topology discovery."
},
{
"value": "regex:",
"description": "Read from any node that has RedisURI matching with the given pattern."
},
{
"value": "replica",
"description": "Read from the replica only."
},
{
"value": "replica-preferred",
"description": "Read preferred from replica and fall back to upstream if no replica is available."
},
{
"value": "subnet:",
"description": "Read from any node in the subnets."
},
{
"value": "upstream",
"description": "Read from the upstream only."
},
{
"value": "upstream-preferred",
"description": "Read preferred from the upstream and fall back to a replica if the upstream is not available."
}
],
"providers": [
{
"name": "any"
}
]
},
{ {
"name": "spring.graphql.cors.allowed-headers", "name": "spring.graphql.cors.allowed-headers",
"values": [ "values": [

View File

@ -1,7 +1,3 @@
# Failure Analyzers
org.springframework.boot.diagnostics.FailureAnalyzer=\
org.springframework.boot.autoconfigure.data.redis.RedisUrlSyntaxFailureAnalyzer
# Depends on Database Initialization Detectors # Depends on Database Initialization Detectors
org.springframework.boot.sql.init.dependency.DependsOnDatabaseInitializationDetector=\ org.springframework.boot.sql.init.dependency.DependsOnDatabaseInitializationDetector=\
org.springframework.boot.autoconfigure.session.JdbcIndexedSessionRepositoryDependsOnDatabaseInitializationDetector org.springframework.boot.autoconfigure.session.JdbcIndexedSessionRepositoryDependsOnDatabaseInitializationDetector

View File

@ -8,9 +8,6 @@ org.springframework.boot.autoconfigure.data.couchbase.CouchbaseRepositoriesAutoC
org.springframework.boot.autoconfigure.data.jdbc.JdbcRepositoriesAutoConfiguration org.springframework.boot.autoconfigure.data.jdbc.JdbcRepositoriesAutoConfiguration
org.springframework.boot.autoconfigure.data.r2dbc.R2dbcDataAutoConfiguration org.springframework.boot.autoconfigure.data.r2dbc.R2dbcDataAutoConfiguration
org.springframework.boot.autoconfigure.data.r2dbc.R2dbcRepositoriesAutoConfiguration org.springframework.boot.autoconfigure.data.r2dbc.R2dbcRepositoriesAutoConfiguration
org.springframework.boot.autoconfigure.data.redis.RedisAutoConfiguration
org.springframework.boot.autoconfigure.data.redis.RedisReactiveAutoConfiguration
org.springframework.boot.autoconfigure.data.redis.RedisRepositoriesAutoConfiguration
org.springframework.boot.autoconfigure.data.rest.RepositoryRestMvcAutoConfiguration org.springframework.boot.autoconfigure.data.rest.RepositoryRestMvcAutoConfiguration
org.springframework.boot.autoconfigure.data.web.SpringDataWebAutoConfiguration org.springframework.boot.autoconfigure.data.web.SpringDataWebAutoConfiguration
org.springframework.boot.autoconfigure.graphql.GraphQlAutoConfiguration org.springframework.boot.autoconfigure.graphql.GraphQlAutoConfiguration

View File

@ -0,0 +1,32 @@
plugins {
id "java-library"
id "org.springframework.boot.auto-configuration"
id "org.springframework.boot.configuration-properties"
id "org.springframework.boot.deployed"
id "org.springframework.boot.docker-test"
id "org.springframework.boot.optional-dependencies"
}
description = "Spring Boot Data Redis"
dependencies {
api(project(":spring-boot-project:spring-boot"))
api("io.lettuce:lettuce-core")
api("org.springframework.data:spring-data-redis")
dockerTestImplementation(project(":spring-boot-project:spring-boot-test"))
dockerTestImplementation(project(":spring-boot-project:spring-boot-tools:spring-boot-test-support-docker"))
dockerTestImplementation(testFixtures(project(":spring-boot-project:spring-boot-autoconfigure")))
dockerTestImplementation("ch.qos.logback:logback-classic")
dockerTestImplementation("com.redis:testcontainers-redis")
dockerTestImplementation("org.junit.jupiter:junit-jupiter")
dockerTestImplementation("org.testcontainers:junit-jupiter")
optional(project(":spring-boot-project:spring-boot-autoconfigure"))
optional("redis.clients:jedis")
testImplementation(project(":spring-boot-project:spring-boot-test"))
testImplementation(project(":spring-boot-project:spring-boot-tools:spring-boot-test-support"))
testRuntimeOnly("ch.qos.logback:logback-classic")
}

View File

@ -1,5 +1,5 @@
/* /*
* Copyright 2012-2024 the original author or authors. * Copyright 2012-2025 the original author or authors.
* *
* Licensed under the Apache License, Version 2.0 (the "License"); * Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License. * you may not use this file except in compliance with the License.
@ -14,7 +14,7 @@
* limitations under the License. * limitations under the License.
*/ */
package org.springframework.boot.autoconfigure.data.redis; package org.springframework.boot.data.redis.autoconfigure;
import com.redis.testcontainers.RedisContainer; import com.redis.testcontainers.RedisContainer;
import org.junit.jupiter.api.AfterEach; import org.junit.jupiter.api.AfterEach;
@ -25,10 +25,9 @@ import org.testcontainers.junit.jupiter.Testcontainers;
import org.springframework.boot.autoconfigure.TestAutoConfigurationPackage; import org.springframework.boot.autoconfigure.TestAutoConfigurationPackage;
import org.springframework.boot.autoconfigure.context.PropertyPlaceholderAutoConfiguration; import org.springframework.boot.autoconfigure.context.PropertyPlaceholderAutoConfiguration;
import org.springframework.boot.autoconfigure.data.alt.redis.CityRedisRepository; import org.springframework.boot.data.redis.domain.city.City;
import org.springframework.boot.autoconfigure.data.empty.EmptyDataPackage; import org.springframework.boot.data.redis.domain.city.CityRepository;
import org.springframework.boot.autoconfigure.data.redis.city.City; import org.springframework.boot.data.redis.domain.empty.EmptyPackage;
import org.springframework.boot.autoconfigure.data.redis.city.CityRepository;
import org.springframework.boot.test.util.TestPropertyValues; import org.springframework.boot.test.util.TestPropertyValues;
import org.springframework.boot.testsupport.container.TestImage; import org.springframework.boot.testsupport.container.TestImage;
import org.springframework.context.annotation.AnnotationConfigApplicationContext; import org.springframework.context.annotation.AnnotationConfigApplicationContext;
@ -83,7 +82,7 @@ class RedisRepositoriesAutoConfigurationTests {
this.context.register(CustomizedConfiguration.class, RedisAutoConfiguration.class, this.context.register(CustomizedConfiguration.class, RedisAutoConfiguration.class,
RedisRepositoriesAutoConfiguration.class, PropertyPlaceholderAutoConfiguration.class); RedisRepositoriesAutoConfiguration.class, PropertyPlaceholderAutoConfiguration.class);
this.context.refresh(); this.context.refresh();
assertThat(this.context.getBean(CityRedisRepository.class)).isNotNull(); assertThat(this.context.getBean(CityRepository.class)).isNotNull();
} }
@Configuration(proxyBeanMethods = false) @Configuration(proxyBeanMethods = false)
@ -93,14 +92,14 @@ class RedisRepositoriesAutoConfigurationTests {
} }
@Configuration(proxyBeanMethods = false) @Configuration(proxyBeanMethods = false)
@TestAutoConfigurationPackage(EmptyDataPackage.class) @TestAutoConfigurationPackage(EmptyPackage.class)
static class EmptyConfiguration { static class EmptyConfiguration {
} }
@Configuration(proxyBeanMethods = false) @Configuration(proxyBeanMethods = false)
@TestAutoConfigurationPackage(RedisRepositoriesAutoConfigurationTests.class) @TestAutoConfigurationPackage(RedisRepositoriesAutoConfigurationTests.class)
@EnableRedisRepositories(basePackageClasses = CityRedisRepository.class) @EnableRedisRepositories(basePackageClasses = CityRepository.class)
static class CustomizedConfiguration { static class CustomizedConfiguration {
} }

View File

@ -1,5 +1,5 @@
/* /*
* Copyright 2012-2023 the original author or authors. * Copyright 2012-2025 the original author or authors.
* *
* Licensed under the Apache License, Version 2.0 (the "License"); * Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License. * you may not use this file except in compliance with the License.
@ -14,7 +14,7 @@
* limitations under the License. * limitations under the License.
*/ */
package org.springframework.boot.autoconfigure.data.redis; package org.springframework.boot.data.redis.autoconfigure;
import io.lettuce.core.resource.ClientResources; import io.lettuce.core.resource.ClientResources;
import io.lettuce.core.resource.ClientResources.Builder; import io.lettuce.core.resource.ClientResources.Builder;
@ -25,7 +25,7 @@ import io.lettuce.core.resource.ClientResources.Builder;
* auto-configuration. * auto-configuration.
* *
* @author Stephane Nicoll * @author Stephane Nicoll
* @since 2.6.0 * @since 4.0.0
*/ */
public interface ClientResourcesBuilderCustomizer { public interface ClientResourcesBuilderCustomizer {

View File

@ -1,5 +1,5 @@
/* /*
* Copyright 2012-2023 the original author or authors. * Copyright 2012-2025 the original author or authors.
* *
* Licensed under the Apache License, Version 2.0 (the "License"); * Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License. * you may not use this file except in compliance with the License.
@ -14,7 +14,7 @@
* limitations under the License. * limitations under the License.
*/ */
package org.springframework.boot.autoconfigure.data.redis; package org.springframework.boot.data.redis.autoconfigure;
import org.springframework.data.redis.connection.jedis.JedisClientConfiguration; import org.springframework.data.redis.connection.jedis.JedisClientConfiguration;
import org.springframework.data.redis.connection.jedis.JedisClientConfiguration.JedisClientConfigurationBuilder; import org.springframework.data.redis.connection.jedis.JedisClientConfiguration.JedisClientConfigurationBuilder;
@ -26,7 +26,7 @@ import org.springframework.data.redis.connection.jedis.JedisClientConfiguration.
* auto-configuration. * auto-configuration.
* *
* @author Mark Paluch * @author Mark Paluch
* @since 2.0.0 * @since 4.0.0
*/ */
@FunctionalInterface @FunctionalInterface
public interface JedisClientConfigurationBuilderCustomizer { public interface JedisClientConfigurationBuilderCustomizer {

View File

@ -14,7 +14,7 @@
* limitations under the License. * limitations under the License.
*/ */
package org.springframework.boot.autoconfigure.data.redis; package org.springframework.boot.data.redis.autoconfigure;
import javax.net.ssl.SSLParameters; import javax.net.ssl.SSLParameters;

View File

@ -1,5 +1,5 @@
/* /*
* Copyright 2012-2024 the original author or authors. * Copyright 2012-2025 the original author or authors.
* *
* Licensed under the Apache License, Version 2.0 (the "License"); * Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License. * you may not use this file except in compliance with the License.
@ -14,7 +14,7 @@
* limitations under the License. * limitations under the License.
*/ */
package org.springframework.boot.autoconfigure.data.redis; package org.springframework.boot.data.redis.autoconfigure;
import org.springframework.data.redis.connection.lettuce.LettuceClientConfiguration; import org.springframework.data.redis.connection.lettuce.LettuceClientConfiguration;
import org.springframework.data.redis.connection.lettuce.LettuceClientConfiguration.LettuceClientConfigurationBuilder; import org.springframework.data.redis.connection.lettuce.LettuceClientConfiguration.LettuceClientConfigurationBuilder;
@ -28,7 +28,7 @@ import org.springframework.data.redis.connection.lettuce.LettuceClientConfigurat
* configuration, use {@link LettuceClientOptionsBuilderCustomizer} instead. * configuration, use {@link LettuceClientOptionsBuilderCustomizer} instead.
* *
* @author Mark Paluch * @author Mark Paluch
* @since 2.0.0 * @since 4.0.0
*/ */
@FunctionalInterface @FunctionalInterface
public interface LettuceClientConfigurationBuilderCustomizer { public interface LettuceClientConfigurationBuilderCustomizer {

View File

@ -1,5 +1,5 @@
/* /*
* Copyright 2012-2024 the original author or authors. * Copyright 2012-2025 the original author or authors.
* *
* Licensed under the Apache License, Version 2.0 (the "License"); * Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License. * you may not use this file except in compliance with the License.
@ -14,7 +14,7 @@
* limitations under the License. * limitations under the License.
*/ */
package org.springframework.boot.autoconfigure.data.redis; package org.springframework.boot.data.redis.autoconfigure;
import io.lettuce.core.ClientOptions; import io.lettuce.core.ClientOptions;
import io.lettuce.core.ClientOptions.Builder; import io.lettuce.core.ClientOptions.Builder;
@ -28,7 +28,7 @@ import org.springframework.data.redis.connection.lettuce.LettuceClientConfigurat
* configuration, use {@link LettuceClientConfigurationBuilderCustomizer} instead. * configuration, use {@link LettuceClientConfigurationBuilderCustomizer} instead.
* *
* @author Soohyun Lim * @author Soohyun Lim
* @since 3.4.0 * @since 4.0.0
*/ */
@FunctionalInterface @FunctionalInterface
public interface LettuceClientOptionsBuilderCustomizer { public interface LettuceClientOptionsBuilderCustomizer {

View File

@ -14,7 +14,7 @@
* limitations under the License. * limitations under the License.
*/ */
package org.springframework.boot.autoconfigure.data.redis; package org.springframework.boot.data.redis.autoconfigure;
import java.time.Duration; import java.time.Duration;
@ -36,9 +36,9 @@ import org.springframework.boot.autoconfigure.condition.ConditionalOnClass;
import org.springframework.boot.autoconfigure.condition.ConditionalOnMissingBean; import org.springframework.boot.autoconfigure.condition.ConditionalOnMissingBean;
import org.springframework.boot.autoconfigure.condition.ConditionalOnProperty; import org.springframework.boot.autoconfigure.condition.ConditionalOnProperty;
import org.springframework.boot.autoconfigure.condition.ConditionalOnThreading; import org.springframework.boot.autoconfigure.condition.ConditionalOnThreading;
import org.springframework.boot.autoconfigure.data.redis.RedisProperties.Lettuce.Cluster.Refresh;
import org.springframework.boot.autoconfigure.data.redis.RedisProperties.Pool;
import org.springframework.boot.autoconfigure.thread.Threading; import org.springframework.boot.autoconfigure.thread.Threading;
import org.springframework.boot.data.redis.autoconfigure.RedisProperties.Lettuce.Cluster.Refresh;
import org.springframework.boot.data.redis.autoconfigure.RedisProperties.Pool;
import org.springframework.boot.ssl.SslBundle; import org.springframework.boot.ssl.SslBundle;
import org.springframework.boot.ssl.SslBundles; import org.springframework.boot.ssl.SslBundles;
import org.springframework.boot.ssl.SslOptions; import org.springframework.boot.ssl.SslOptions;

View File

@ -14,7 +14,7 @@
* limitations under the License. * limitations under the License.
*/ */
package org.springframework.boot.autoconfigure.data.redis; package org.springframework.boot.data.redis.autoconfigure;
import java.util.List; import java.util.List;

View File

@ -14,7 +14,7 @@
* limitations under the License. * limitations under the License.
*/ */
package org.springframework.boot.autoconfigure.data.redis; package org.springframework.boot.data.redis.autoconfigure;
import org.springframework.beans.factory.ObjectProvider; import org.springframework.beans.factory.ObjectProvider;
import org.springframework.boot.autoconfigure.AutoConfiguration; import org.springframework.boot.autoconfigure.AutoConfiguration;
@ -43,7 +43,7 @@ import org.springframework.data.redis.core.StringRedisTemplate;
* @author Stephane Nicoll * @author Stephane Nicoll
* @author Marco Aust * @author Marco Aust
* @author Mark Paluch * @author Mark Paluch
* @since 1.0.0 * @since 4.0.0
*/ */
@AutoConfiguration @AutoConfiguration
@ConditionalOnClass(RedisOperations.class) @ConditionalOnClass(RedisOperations.class)

View File

@ -14,16 +14,16 @@
* limitations under the License. * limitations under the License.
*/ */
package org.springframework.boot.autoconfigure.data.redis; package org.springframework.boot.data.redis.autoconfigure;
import java.util.ArrayList; import java.util.ArrayList;
import java.util.List; import java.util.List;
import org.springframework.beans.factory.ObjectProvider; import org.springframework.beans.factory.ObjectProvider;
import org.springframework.boot.autoconfigure.data.redis.RedisConnectionDetails.Cluster; import org.springframework.boot.data.redis.autoconfigure.RedisConnectionDetails.Cluster;
import org.springframework.boot.autoconfigure.data.redis.RedisConnectionDetails.Node; import org.springframework.boot.data.redis.autoconfigure.RedisConnectionDetails.Node;
import org.springframework.boot.autoconfigure.data.redis.RedisConnectionDetails.Sentinel; import org.springframework.boot.data.redis.autoconfigure.RedisConnectionDetails.Sentinel;
import org.springframework.boot.autoconfigure.data.redis.RedisProperties.Pool; import org.springframework.boot.data.redis.autoconfigure.RedisProperties.Pool;
import org.springframework.boot.ssl.SslBundle; import org.springframework.boot.ssl.SslBundle;
import org.springframework.boot.ssl.SslBundles; import org.springframework.boot.ssl.SslBundles;
import org.springframework.data.redis.connection.RedisClusterConfiguration; import org.springframework.data.redis.connection.RedisClusterConfiguration;

View File

@ -14,7 +14,7 @@
* limitations under the License. * limitations under the License.
*/ */
package org.springframework.boot.autoconfigure.data.redis; package org.springframework.boot.data.redis.autoconfigure;
import java.util.List; import java.util.List;
@ -27,7 +27,7 @@ import org.springframework.util.Assert;
* *
* @author Moritz Halbritter * @author Moritz Halbritter
* @author Andy Wilkinson * @author Andy Wilkinson
* @since 3.1.0 * @since 4.0.0
*/ */
public interface RedisConnectionDetails extends ConnectionDetails { public interface RedisConnectionDetails extends ConnectionDetails {

View File

@ -14,7 +14,7 @@
* limitations under the License. * limitations under the License.
*/ */
package org.springframework.boot.autoconfigure.data.redis; package org.springframework.boot.data.redis.autoconfigure;
import java.time.Duration; import java.time.Duration;
import java.util.List; import java.util.List;
@ -32,7 +32,7 @@ import org.springframework.boot.context.properties.ConfigurationProperties;
* @author Stephane Nicoll * @author Stephane Nicoll
* @author Scott Frederick * @author Scott Frederick
* @author Yanming Zhou * @author Yanming Zhou
* @since 1.0.0 * @since 4.0.0
*/ */
@ConfigurationProperties("spring.data.redis") @ConfigurationProperties("spring.data.redis")
public class RedisProperties { public class RedisProperties {

View File

@ -1,5 +1,5 @@
/* /*
* Copyright 2012-2023 the original author or authors. * Copyright 2012-2025 the original author or authors.
* *
* Licensed under the Apache License, Version 2.0 (the "License"); * Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License. * you may not use this file except in compliance with the License.
@ -14,7 +14,7 @@
* limitations under the License. * limitations under the License.
*/ */
package org.springframework.boot.autoconfigure.data.redis; package org.springframework.boot.data.redis.autoconfigure;
import reactor.core.publisher.Flux; import reactor.core.publisher.Flux;
@ -37,7 +37,7 @@ import org.springframework.data.redis.serializer.RedisSerializer;
* *
* @author Mark Paluch * @author Mark Paluch
* @author Stephane Nicoll * @author Stephane Nicoll
* @since 2.0.0 * @since 4.0.0
*/ */
@AutoConfiguration(after = RedisAutoConfiguration.class) @AutoConfiguration(after = RedisAutoConfiguration.class)
@ConditionalOnClass({ ReactiveRedisConnectionFactory.class, ReactiveRedisTemplate.class, Flux.class }) @ConditionalOnClass({ ReactiveRedisConnectionFactory.class, ReactiveRedisTemplate.class, Flux.class })

View File

@ -14,7 +14,7 @@
* limitations under the License. * limitations under the License.
*/ */
package org.springframework.boot.autoconfigure.data.redis; package org.springframework.boot.data.redis.autoconfigure;
import org.springframework.boot.autoconfigure.AutoConfiguration; import org.springframework.boot.autoconfigure.AutoConfiguration;
import org.springframework.boot.autoconfigure.EnableAutoConfiguration; import org.springframework.boot.autoconfigure.EnableAutoConfiguration;
@ -33,7 +33,7 @@ import org.springframework.data.redis.repository.support.RedisRepositoryFactoryB
* *
* @author Eddú Meléndez * @author Eddú Meléndez
* @author Stephane Nicoll * @author Stephane Nicoll
* @since 1.4.0 * @since 4.0.0
* @see EnableRedisRepositories * @see EnableRedisRepositories
*/ */
@AutoConfiguration(after = RedisAutoConfiguration.class) @AutoConfiguration(after = RedisAutoConfiguration.class)

View File

@ -1,5 +1,5 @@
/* /*
* Copyright 2012-2024 the original author or authors. * Copyright 2012-2025 the original author or authors.
* *
* Licensed under the Apache License, Version 2.0 (the "License"); * Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License. * you may not use this file except in compliance with the License.
@ -14,7 +14,7 @@
* limitations under the License. * limitations under the License.
*/ */
package org.springframework.boot.autoconfigure.data.redis; package org.springframework.boot.data.redis.autoconfigure;
import java.lang.annotation.Annotation; import java.lang.annotation.Annotation;

View File

@ -14,7 +14,7 @@
* limitations under the License. * limitations under the License.
*/ */
package org.springframework.boot.autoconfigure.data.redis; package org.springframework.boot.data.redis.autoconfigure;
import java.net.URI; import java.net.URI;
import java.net.URISyntaxException; import java.net.URISyntaxException;

View File

@ -1,5 +1,5 @@
/* /*
* Copyright 2012-2020 the original author or authors. * Copyright 2012-2025 the original author or authors.
* *
* Licensed under the Apache License, Version 2.0 (the "License"); * Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License. * you may not use this file except in compliance with the License.
@ -14,7 +14,7 @@
* limitations under the License. * limitations under the License.
*/ */
package org.springframework.boot.autoconfigure.data.redis; package org.springframework.boot.data.redis.autoconfigure;
/** /**
* Exception thrown when a Redis URL is malformed or invalid. * Exception thrown when a Redis URL is malformed or invalid.

View File

@ -1,5 +1,5 @@
/* /*
* Copyright 2012-2022 the original author or authors. * Copyright 2012-2025 the original author or authors.
* *
* Licensed under the Apache License, Version 2.0 (the "License"); * Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License. * you may not use this file except in compliance with the License.
@ -14,7 +14,7 @@
* limitations under the License. * limitations under the License.
*/ */
package org.springframework.boot.autoconfigure.data.redis; package org.springframework.boot.data.redis.autoconfigure;
import java.net.URI; import java.net.URI;
import java.net.URISyntaxException; import java.net.URISyntaxException;

View File

@ -1,5 +1,5 @@
/* /*
* Copyright 2012-2019 the original author or authors. * Copyright 2012-2025 the original author or authors.
* *
* Licensed under the Apache License, Version 2.0 (the "License"); * Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License. * you may not use this file except in compliance with the License.
@ -17,4 +17,4 @@
/** /**
* Auto-configuration for Spring Data Redis. * Auto-configuration for Spring Data Redis.
*/ */
package org.springframework.boot.autoconfigure.data.redis; package org.springframework.boot.data.redis.autoconfigure;

View File

@ -0,0 +1,319 @@
{
"groups": [],
"properties": [
{
"name": "spring.data.redis.repositories.enabled",
"type": "java.lang.Boolean",
"description": "Whether to enable Redis repositories.",
"defaultValue": true
},
{
"name": "spring.data.redis.ssl",
"type": "java.lang.Boolean",
"deprecation": {
"replacement": "spring.data.redis.ssl.enabled",
"level": "error"
}
},
{
"name": "spring.redis.client-name",
"type": "java.lang.String",
"deprecation": {
"replacement": "spring.data.redis.client-name",
"level": "error"
}
},
{
"name": "spring.redis.client-type",
"type": "org.springframework.boot.data.redis.autoconfigure.RedisProperties$ClientType",
"deprecation": {
"replacement": "spring.data.redis.client-type",
"level": "error"
}
},
{
"name": "spring.redis.cluster.max-redirects",
"type": "java.lang.Integer",
"deprecation": {
"replacement": "spring.data.redis.cluster.max-redirects",
"level": "error"
}
},
{
"name": "spring.redis.cluster.nodes",
"type": "java.util.List<java.lang.String>",
"deprecation": {
"replacement": "spring.data.redis.cluster.nodes",
"level": "error"
}
},
{
"name": "spring.redis.connect-timeout",
"type": "java.time.Duration",
"deprecation": {
"replacement": "spring.data.redis.connect-timeout",
"level": "error"
}
},
{
"name": "spring.redis.database",
"type": "java.lang.Integer",
"deprecation": {
"replacement": "spring.data.redis.database",
"level": "error"
}
},
{
"name": "spring.redis.host",
"type": "java.lang.String",
"deprecation": {
"replacement": "spring.data.redis.host",
"level": "error"
}
},
{
"name": "spring.redis.jedis.pool.enabled",
"type": "java.lang.Boolean",
"deprecation": {
"level": "error"
}
},
{
"name": "spring.redis.jedis.pool.max-active",
"type": "java.lang.Integer",
"deprecation": {
"level": "error"
}
},
{
"name": "spring.redis.jedis.pool.max-idle",
"type": "java.lang.Integer",
"deprecation": {
"level": "error"
}
},
{
"name": "spring.redis.jedis.pool.max-wait",
"type": "java.time.Duration",
"deprecation": {
"level": "error"
}
},
{
"name": "spring.redis.jedis.pool.min-idle",
"type": "java.lang.Integer",
"deprecation": {
"level": "error"
}
},
{
"name": "spring.redis.jedis.pool.time-between-eviction-runs",
"type": "java.time.Duration",
"deprecation": {
"level": "error"
}
},
{
"name": "spring.redis.lettuce.cluster.refresh.adaptive",
"type": "java.lang.Boolean",
"deprecation": {
"replacement": "spring.data.redis.lettuce.cluster.refresh.adaptive",
"level": "error"
}
},
{
"name": "spring.redis.lettuce.cluster.refresh.dynamic-refresh-sources",
"type": "java.lang.Boolean",
"deprecation": {
"replacement": "spring.data.redis.lettuce.cluster.refresh.dynamic-refresh-sources",
"level": "error"
}
},
{
"name": "spring.redis.lettuce.cluster.refresh.period",
"type": "java.time.Duration",
"deprecation": {
"replacement": "spring.data.redis.lettuce.cluster.refresh.period",
"level": "error"
}
},
{
"name": "spring.redis.lettuce.pool.enabled",
"type": "java.lang.Boolean",
"deprecation": {
"level": "error"
}
},
{
"name": "spring.redis.lettuce.pool.max-active",
"type": "java.lang.Integer",
"deprecation": {
"level": "error"
}
},
{
"name": "spring.redis.lettuce.pool.max-idle",
"type": "java.lang.Integer",
"deprecation": {
"level": "error"
}
},
{
"name": "spring.redis.lettuce.pool.max-wait",
"type": "java.time.Duration",
"deprecation": {
"level": "error"
}
},
{
"name": "spring.redis.lettuce.pool.min-idle",
"type": "java.lang.Integer",
"deprecation": {
"level": "error"
}
},
{
"name": "spring.redis.lettuce.pool.time-between-eviction-runs",
"type": "java.time.Duration",
"deprecation": {
"level": "error"
}
},
{
"name": "spring.redis.lettuce.shutdown-timeout",
"type": "java.time.Duration",
"deprecation": {
"replacement": "spring.data.redis.lettuce.shutdown-timeout",
"level": "error"
}
},
{
"name": "spring.redis.password",
"type": "java.lang.String",
"deprecation": {
"replacement": "spring.data.redis.password",
"level": "error"
}
},
{
"name": "spring.redis.port",
"type": "java.lang.Integer",
"deprecation": {
"replacement": "spring.data.redis.port",
"level": "error"
}
},
{
"name": "spring.redis.sentinel.master",
"type": "java.lang.String",
"deprecation": {
"replacement": "spring.data.redis.sentinel.master",
"level": "error"
}
},
{
"name": "spring.redis.sentinel.nodes",
"type": "java.util.List<java.lang.String>",
"deprecation": {
"replacement": "spring.data.redis.sentinel.nodes",
"level": "error"
}
},
{
"name": "spring.redis.sentinel.password",
"type": "java.lang.String",
"deprecation": {
"replacement": "spring.data.redis.sentinel.password",
"level": "error"
}
},
{
"name": "spring.redis.sentinel.username",
"type": "java.lang.String",
"deprecation": {
"replacement": "spring.data.redis.sentinel.username",
"level": "error"
}
},
{
"name": "spring.redis.ssl",
"type": "java.lang.Boolean",
"deprecation": {
"replacement": "spring.data.redis.ssl",
"level": "error"
}
},
{
"name": "spring.redis.timeout",
"type": "java.time.Duration",
"deprecation": {
"replacement": "spring.data.redis.timeout",
"level": "error"
}
},
{
"name": "spring.redis.url",
"type": "java.lang.String",
"deprecation": {
"replacement": "spring.data.redis.url",
"level": "error"
}
},
{
"name": "spring.redis.username",
"type": "java.lang.String",
"deprecation": {
"replacement": "spring.data.redis.username",
"level": "error"
}
}
],
"hints": [
{
"name": "spring.data.redis.lettuce.read-from",
"values": [
{
"value": "any",
"description": "Read from any node."
},
{
"value": "any-replica",
"description": "Read from any replica node."
},
{
"value": "lowest-latency",
"description": "Read from the node with the lowest latency during topology discovery."
},
{
"value": "regex:",
"description": "Read from any node that has RedisURI matching with the given pattern."
},
{
"value": "replica",
"description": "Read from the replica only."
},
{
"value": "replica-preferred",
"description": "Read preferred from replica and fall back to upstream if no replica is available."
},
{
"value": "subnet:",
"description": "Read from any node in the subnets."
},
{
"value": "upstream",
"description": "Read from the upstream only."
},
{
"value": "upstream-preferred",
"description": "Read preferred from the upstream and fall back to a replica if the upstream is not available."
}
],
"providers": [
{
"name": "any"
}
]
}
]
}

View File

@ -0,0 +1,4 @@
# Failure Analyzers
org.springframework.boot.diagnostics.FailureAnalyzer=\
org.springframework.boot.data.redis.autoconfigure.RedisUrlSyntaxFailureAnalyzer

View File

@ -0,0 +1,3 @@
org.springframework.boot.data.redis.autoconfigure.RedisAutoConfiguration
org.springframework.boot.data.redis.autoconfigure.RedisReactiveAutoConfiguration
org.springframework.boot.data.redis.autoconfigure.RedisRepositoriesAutoConfiguration

View File

@ -14,14 +14,14 @@
* limitations under the License. * limitations under the License.
*/ */
package org.springframework.boot.autoconfigure.data.redis; package org.springframework.boot.data.redis.autoconfigure;
import java.util.List; import java.util.List;
import org.junit.jupiter.api.BeforeEach; import org.junit.jupiter.api.BeforeEach;
import org.junit.jupiter.api.Test; import org.junit.jupiter.api.Test;
import org.springframework.boot.autoconfigure.data.redis.RedisConnectionDetails.Node; import org.springframework.boot.data.redis.autoconfigure.RedisConnectionDetails.Node;
import org.springframework.boot.ssl.DefaultSslBundleRegistry; import org.springframework.boot.ssl.DefaultSslBundleRegistry;
import org.springframework.boot.ssl.SslBundle; import org.springframework.boot.ssl.SslBundle;

View File

@ -14,7 +14,7 @@
* limitations under the License. * limitations under the License.
*/ */
package org.springframework.boot.autoconfigure.data.redis; package org.springframework.boot.data.redis.autoconfigure;
import java.time.Duration; import java.time.Duration;

View File

@ -1,5 +1,5 @@
/* /*
* Copyright 2012-2023 the original author or authors. * Copyright 2012-2025 the original author or authors.
* *
* Licensed under the Apache License, Version 2.0 (the "License"); * Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License. * you may not use this file except in compliance with the License.
@ -14,7 +14,7 @@
* limitations under the License. * limitations under the License.
*/ */
package org.springframework.boot.autoconfigure.data.redis; package org.springframework.boot.data.redis.autoconfigure;
import org.junit.jupiter.api.Test; import org.junit.jupiter.api.Test;

View File

@ -14,7 +14,7 @@
* limitations under the License. * limitations under the License.
*/ */
package org.springframework.boot.autoconfigure.data.redis; package org.springframework.boot.data.redis.autoconfigure;
import java.time.Duration; import java.time.Duration;
import java.util.Arrays; import java.util.Arrays;
@ -45,8 +45,8 @@ import org.junit.jupiter.params.provider.Arguments;
import org.junit.jupiter.params.provider.MethodSource; import org.junit.jupiter.params.provider.MethodSource;
import org.springframework.boot.autoconfigure.AutoConfigurations; import org.springframework.boot.autoconfigure.AutoConfigurations;
import org.springframework.boot.autoconfigure.data.redis.RedisProperties.Pool;
import org.springframework.boot.autoconfigure.ssl.SslAutoConfiguration; import org.springframework.boot.autoconfigure.ssl.SslAutoConfiguration;
import org.springframework.boot.data.redis.autoconfigure.RedisProperties.Pool;
import org.springframework.boot.test.context.assertj.AssertableApplicationContext; import org.springframework.boot.test.context.assertj.AssertableApplicationContext;
import org.springframework.boot.test.context.runner.ApplicationContextRunner; import org.springframework.boot.test.context.runner.ApplicationContextRunner;
import org.springframework.boot.test.context.runner.ContextConsumer; import org.springframework.boot.test.context.runner.ContextConsumer;

View File

@ -1,5 +1,5 @@
/* /*
* Copyright 2012-2023 the original author or authors. * Copyright 2012-2025 the original author or authors.
* *
* Licensed under the Apache License, Version 2.0 (the "License"); * Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License. * you may not use this file except in compliance with the License.
@ -14,12 +14,12 @@
* limitations under the License. * limitations under the License.
*/ */
package org.springframework.boot.autoconfigure.data.redis; package org.springframework.boot.data.redis.autoconfigure;
import io.lettuce.core.cluster.ClusterTopologyRefreshOptions; import io.lettuce.core.cluster.ClusterTopologyRefreshOptions;
import org.junit.jupiter.api.Test; import org.junit.jupiter.api.Test;
import org.springframework.boot.autoconfigure.data.redis.RedisProperties.Lettuce; import org.springframework.boot.data.redis.autoconfigure.RedisProperties.Lettuce;
import static org.assertj.core.api.Assertions.assertThat; import static org.assertj.core.api.Assertions.assertThat;

View File

@ -1,5 +1,5 @@
/* /*
* Copyright 2012-2023 the original author or authors. * Copyright 2012-2025 the original author or authors.
* *
* Licensed under the Apache License, Version 2.0 (the "License"); * Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License. * you may not use this file except in compliance with the License.
@ -14,7 +14,7 @@
* limitations under the License. * limitations under the License.
*/ */
package org.springframework.boot.autoconfigure.data.redis; package org.springframework.boot.data.redis.autoconfigure;
import java.util.Map; import java.util.Map;

View File

@ -1,5 +1,5 @@
/* /*
* Copyright 2012-2023 the original author or authors. * Copyright 2012-2025 the original author or authors.
* *
* Licensed under the Apache License, Version 2.0 (the "License"); * Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License. * you may not use this file except in compliance with the License.
@ -14,7 +14,7 @@
* limitations under the License. * limitations under the License.
*/ */
package org.springframework.boot.autoconfigure.data.redis; package org.springframework.boot.data.redis.autoconfigure;
import org.junit.jupiter.api.Test; import org.junit.jupiter.api.Test;

View File

@ -1,5 +1,5 @@
/* /*
* Copyright 2012-2019 the original author or authors. * Copyright 2012-2025 the original author or authors.
* *
* Licensed under the Apache License, Version 2.0 (the "License"); * Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License. * you may not use this file except in compliance with the License.
@ -14,7 +14,7 @@
* limitations under the License. * limitations under the License.
*/ */
package org.springframework.boot.autoconfigure.data.redis.city; package org.springframework.boot.data.redis.domain.city;
import java.io.Serializable; import java.io.Serializable;

View File

@ -1,5 +1,5 @@
/* /*
* Copyright 2012-2019 the original author or authors. * Copyright 2012-2025 the original author or authors.
* *
* Licensed under the Apache License, Version 2.0 (the "License"); * Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License. * you may not use this file except in compliance with the License.
@ -14,7 +14,7 @@
* limitations under the License. * limitations under the License.
*/ */
package org.springframework.boot.autoconfigure.data.redis.city; package org.springframework.boot.data.redis.domain.city;
import org.springframework.data.domain.Page; import org.springframework.data.domain.Page;
import org.springframework.data.domain.Pageable; import org.springframework.data.domain.Pageable;

View File

@ -1,5 +1,5 @@
/* /*
* Copyright 2012-2019 the original author or authors. * Copyright 2012-2025 the original author or authors.
* *
* Licensed under the Apache License, Version 2.0 (the "License"); * Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License. * you may not use this file except in compliance with the License.
@ -14,11 +14,8 @@
* limitations under the License. * limitations under the License.
*/ */
package org.springframework.boot.autoconfigure.data.alt.redis; package org.springframework.boot.data.redis.domain.empty;
import org.springframework.boot.autoconfigure.data.redis.city.City; public class EmptyPackage {
import org.springframework.data.repository.Repository;
public interface CityRedisRepository extends Repository<City, Long> {
} }

View File

@ -2031,6 +2031,7 @@ bom {
"spring-boot-data-ldap", "spring-boot-data-ldap",
"spring-boot-data-mongodb", "spring-boot-data-mongodb",
"spring-boot-data-neo4j", "spring-boot-data-neo4j",
"spring-boot-data-redis",
"spring-boot-devtools", "spring-boot-devtools",
"spring-boot-docker-compose", "spring-boot-docker-compose",
"spring-boot-elasticsearch", "spring-boot-elasticsearch",

View File

@ -40,6 +40,7 @@ dependencies {
optional(project(":spring-boot-project:spring-boot-autoconfigure-all")) optional(project(":spring-boot-project:spring-boot-autoconfigure-all"))
optional(project(":spring-boot-project:spring-boot-actuator-autoconfigure")) optional(project(":spring-boot-project:spring-boot-actuator-autoconfigure"))
optional(project(":spring-boot-project:spring-boot-cassandra")) optional(project(":spring-boot-project:spring-boot-cassandra"))
optional(project(":spring-boot-project:spring-boot-data-redis"))
optional(project(":spring-boot-project:spring-boot-elasticsearch")) optional(project(":spring-boot-project:spring-boot-elasticsearch"))
optional(project(":spring-boot-project:spring-boot-flyway")) optional(project(":spring-boot-project:spring-boot-flyway"))
optional(project(":spring-boot-project:spring-boot-hazelcast")) optional(project(":spring-boot-project:spring-boot-hazelcast"))

View File

@ -18,8 +18,8 @@ package org.springframework.boot.docker.compose.service.connection.redis;
import javax.net.ssl.SSLContext; import javax.net.ssl.SSLContext;
import org.springframework.boot.autoconfigure.data.redis.RedisConnectionDetails; import org.springframework.boot.data.redis.autoconfigure.RedisConnectionDetails;
import org.springframework.boot.autoconfigure.data.redis.RedisConnectionDetails.Standalone; import org.springframework.boot.data.redis.autoconfigure.RedisConnectionDetails.Standalone;
import org.springframework.boot.docker.compose.service.connection.test.DockerComposeTest; import org.springframework.boot.docker.compose.service.connection.test.DockerComposeTest;
import org.springframework.boot.ssl.SslBundle; import org.springframework.boot.ssl.SslBundle;
import org.springframework.boot.testsupport.container.TestImage; import org.springframework.boot.testsupport.container.TestImage;

View File

@ -16,7 +16,7 @@
package org.springframework.boot.docker.compose.service.connection.redis; package org.springframework.boot.docker.compose.service.connection.redis;
import org.springframework.boot.autoconfigure.data.redis.RedisConnectionDetails; import org.springframework.boot.data.redis.autoconfigure.RedisConnectionDetails;
import org.springframework.boot.docker.compose.core.RunningService; import org.springframework.boot.docker.compose.core.RunningService;
import org.springframework.boot.docker.compose.service.connection.DockerComposeConnectionDetailsFactory; import org.springframework.boot.docker.compose.service.connection.DockerComposeConnectionDetailsFactory;
import org.springframework.boot.docker.compose.service.connection.DockerComposeConnectionSource; import org.springframework.boot.docker.compose.service.connection.DockerComposeConnectionSource;

View File

@ -68,6 +68,7 @@ dependencies {
autoConfiguration(project(path: ":spring-boot-project:spring-boot-data-ldap", configuration: "autoConfigurationMetadata")) autoConfiguration(project(path: ":spring-boot-project:spring-boot-data-ldap", configuration: "autoConfigurationMetadata"))
autoConfiguration(project(path: ":spring-boot-project:spring-boot-data-mongodb", configuration: "autoConfigurationMetadata")) autoConfiguration(project(path: ":spring-boot-project:spring-boot-data-mongodb", configuration: "autoConfigurationMetadata"))
autoConfiguration(project(path: ":spring-boot-project:spring-boot-data-neo4j", configuration: "autoConfigurationMetadata")) autoConfiguration(project(path: ":spring-boot-project:spring-boot-data-neo4j", configuration: "autoConfigurationMetadata"))
autoConfiguration(project(path: ":spring-boot-project:spring-boot-data-redis", configuration: "autoConfigurationMetadata"))
autoConfiguration(project(path: ":spring-boot-project:spring-boot-devtools", configuration: "autoConfigurationMetadata")) autoConfiguration(project(path: ":spring-boot-project:spring-boot-devtools", configuration: "autoConfigurationMetadata"))
autoConfiguration(project(path: ":spring-boot-project:spring-boot-elasticsearch", configuration: "autoConfigurationMetadata")) autoConfiguration(project(path: ":spring-boot-project:spring-boot-elasticsearch", configuration: "autoConfigurationMetadata"))
autoConfiguration(project(path: ":spring-boot-project:spring-boot-flyway", configuration: "autoConfigurationMetadata")) autoConfiguration(project(path: ":spring-boot-project:spring-boot-flyway", configuration: "autoConfigurationMetadata"))
@ -124,6 +125,7 @@ dependencies {
configurationProperties(project(path: ":spring-boot-project:spring-boot-data-jpa", configuration: "configurationPropertiesMetadata")) configurationProperties(project(path: ":spring-boot-project:spring-boot-data-jpa", configuration: "configurationPropertiesMetadata"))
configurationProperties(project(path: ":spring-boot-project:spring-boot-data-ldap", configuration: "configurationPropertiesMetadata")) configurationProperties(project(path: ":spring-boot-project:spring-boot-data-ldap", configuration: "configurationPropertiesMetadata"))
configurationProperties(project(path: ":spring-boot-project:spring-boot-data-neo4j", configuration: "configurationPropertiesMetadata")) configurationProperties(project(path: ":spring-boot-project:spring-boot-data-neo4j", configuration: "configurationPropertiesMetadata"))
configurationProperties(project(path: ":spring-boot-project:spring-boot-data-redis", configuration: "configurationPropertiesMetadata"))
configurationProperties(project(path: ":spring-boot-project:spring-boot-devtools", configuration: "configurationPropertiesMetadata")) configurationProperties(project(path: ":spring-boot-project:spring-boot-devtools", configuration: "configurationPropertiesMetadata"))
configurationProperties(project(path: ":spring-boot-project:spring-boot-docker-compose", configuration: "configurationPropertiesMetadata")) configurationProperties(project(path: ":spring-boot-project:spring-boot-docker-compose", configuration: "configurationPropertiesMetadata"))
configurationProperties(project(path: ":spring-boot-project:spring-boot-elasticsearch", configuration: "configurationPropertiesMetadata")) configurationProperties(project(path: ":spring-boot-project:spring-boot-elasticsearch", configuration: "configurationPropertiesMetadata"))

View File

@ -72,9 +72,9 @@ spring:
---- ----
TIP: You can also register an arbitrary number of beans that implement javadoc:org.springframework.boot.autoconfigure.data.redis.LettuceClientConfigurationBuilderCustomizer[] for more advanced customizations. TIP: You can also register an arbitrary number of beans that implement javadoc:org.springframework.boot.data.redis.autoconfigure.LettuceClientConfigurationBuilderCustomizer[] for more advanced customizations.
javadoc:io.lettuce.core.resource.ClientResources[] can also be customized using javadoc:org.springframework.boot.autoconfigure.data.redis.ClientResourcesBuilderCustomizer[]. javadoc:io.lettuce.core.resource.ClientResources[] can also be customized using javadoc:org.springframework.boot.data.redis.autoconfigure.ClientResourcesBuilderCustomizer[].
If you use Jedis, javadoc:org.springframework.boot.autoconfigure.data.redis.JedisClientConfigurationBuilderCustomizer[] is also available. If you use Jedis, javadoc:org.springframework.boot.data.redis.autoconfigure.JedisClientConfigurationBuilderCustomizer[] is also available.
Alternatively, you can register a bean of type javadoc:org.springframework.data.redis.connection.RedisStandaloneConfiguration[], javadoc:org.springframework.data.redis.connection.RedisSentinelConfiguration[], or javadoc:org.springframework.data.redis.connection.RedisClusterConfiguration[] to take full control over the configuration. Alternatively, you can register a bean of type javadoc:org.springframework.data.redis.connection.RedisStandaloneConfiguration[], javadoc:org.springframework.data.redis.connection.RedisSentinelConfiguration[], or javadoc:org.springframework.data.redis.connection.RedisClusterConfiguration[] to take full control over the configuration.
If you add your own javadoc:org.springframework.context.annotation.Bean[format=annotation] of any of the auto-configured types, it replaces the default (except in the case of javadoc:org.springframework.data.redis.core.RedisTemplate[], when the exclusion is based on the bean name, `redisTemplate`, not its type). If you add your own javadoc:org.springframework.context.annotation.Bean[format=annotation] of any of the auto-configured types, it replaces the default (except in the case of javadoc:org.springframework.data.redis.core.RedisTemplate[], when the exclusion is based on the bean name, `redisTemplate`, not its type).

View File

@ -128,7 +128,7 @@ The following service connections are currently supported:
| javadoc:org.springframework.boot.autoconfigure.amqp.RabbitConnectionDetails[] | javadoc:org.springframework.boot.autoconfigure.amqp.RabbitConnectionDetails[]
| Containers named "rabbitmq" or "bitnami/rabbitmq" | Containers named "rabbitmq" or "bitnami/rabbitmq"
| javadoc:org.springframework.boot.autoconfigure.data.redis.RedisConnectionDetails[] | javadoc:org.springframework.boot.data.redis.autoconfigure.RedisConnectionDetails[]
| Containers named "redis", "bitnami/redis", "redis/redis-stack" or "redis/redis-stack-server" | Containers named "redis", "bitnami/redis", "redis/redis-stack" or "redis/redis-stack-server"
| javadoc:org.springframework.boot.actuate.autoconfigure.tracing.zipkin.ZipkinConnectionDetails[] | javadoc:org.springframework.boot.actuate.autoconfigure.tracing.zipkin.ZipkinConnectionDetails[]

View File

@ -92,7 +92,7 @@ The following service connection factories are provided in the `spring-boot-test
| javadoc:org.springframework.boot.autoconfigure.amqp.RabbitConnectionDetails[] | javadoc:org.springframework.boot.autoconfigure.amqp.RabbitConnectionDetails[]
| Containers of type javadoc:{url-testcontainers-rabbitmq-javadoc}/org.testcontainers.containers.RabbitMQContainer[] | Containers of type javadoc:{url-testcontainers-rabbitmq-javadoc}/org.testcontainers.containers.RabbitMQContainer[]
| javadoc:org.springframework.boot.autoconfigure.data.redis.RedisConnectionDetails[] | javadoc:org.springframework.boot.data.redis.autoconfigure.RedisConnectionDetails[]
| Containers of type javadoc:com.redis.testcontainers.RedisContainer[] or javadoc:com.redis.testcontainers.RedisStackContainer[], or containers named "redis", "redis/redis-stack" or "redis/redis-stack-server" | Containers of type javadoc:com.redis.testcontainers.RedisContainer[] or javadoc:com.redis.testcontainers.RedisStackContainer[], or containers named "redis", "redis/redis-stack" or "redis/redis-stack-server"
| javadoc:org.springframework.boot.actuate.autoconfigure.tracing.zipkin.ZipkinConnectionDetails[] | javadoc:org.springframework.boot.actuate.autoconfigure.tracing.zipkin.ZipkinConnectionDetails[]
@ -121,7 +121,7 @@ include-code::MyRedisConfiguration[]
Spring Boot can't tell from javadoc:org.testcontainers.containers.GenericContainer[] which container image is used, so the `name` attribute from javadoc:org.springframework.boot.testcontainers.service.connection.ServiceConnection[format=annotation] must be used to provide that hint. Spring Boot can't tell from javadoc:org.testcontainers.containers.GenericContainer[] which container image is used, so the `name` attribute from javadoc:org.springframework.boot.testcontainers.service.connection.ServiceConnection[format=annotation] must be used to provide that hint.
You can also use the `name` attribute of javadoc:org.springframework.boot.testcontainers.service.connection.ServiceConnection[format=annotation] to override which connection detail will be used, for example when using custom images. You can also use the `name` attribute of javadoc:org.springframework.boot.testcontainers.service.connection.ServiceConnection[format=annotation] to override which connection detail will be used, for example when using custom images.
If you are using the Docker image `registry.mycompany.com/mirror/myredis`, you'd use `@ServiceConnection(name="redis")` to ensure javadoc:org.springframework.boot.autoconfigure.data.redis.RedisConnectionDetails[] are created. If you are using the Docker image `registry.mycompany.com/mirror/myredis`, you'd use `@ServiceConnection(name="redis")` to ensure javadoc:org.springframework.boot.data.redis.autoconfigure.RedisConnectionDetails[] are created.

View File

@ -6,8 +6,7 @@ description = "Starter for using Redis key-value data store with Spring Data Red
dependencies { dependencies {
api(project(":spring-boot-project:spring-boot-starters:spring-boot-starter")) api(project(":spring-boot-project:spring-boot-starters:spring-boot-starter"))
api(project(":spring-boot-project:spring-boot-data-redis"))
api(project(":spring-boot-project:spring-boot-tx")) api(project(":spring-boot-project:spring-boot-tx"))
api("io.lettuce:lettuce-core")
api("io.projectreactor:reactor-core") api("io.projectreactor:reactor-core")
api("org.springframework.data:spring-data-redis")
} }

View File

@ -6,7 +6,6 @@ description = "Starter for using Redis key-value data store with Spring Data Red
dependencies { dependencies {
api(project(":spring-boot-project:spring-boot-starters:spring-boot-starter")) api(project(":spring-boot-project:spring-boot-starters:spring-boot-starter"))
api(project(":spring-boot-project:spring-boot-data-redis"))
api(project(":spring-boot-project:spring-boot-tx")) api(project(":spring-boot-project:spring-boot-tx"))
api("io.lettuce:lettuce-core")
api("org.springframework.data:spring-data-redis")
} }

View File

@ -43,6 +43,7 @@ dependencies {
optional(project(":spring-boot-project:spring-boot-data-ldap")) optional(project(":spring-boot-project:spring-boot-data-ldap"))
optional(project(":spring-boot-project:spring-boot-data-mongodb")) optional(project(":spring-boot-project:spring-boot-data-mongodb"))
optional(project(":spring-boot-project:spring-boot-data-neo4j")) optional(project(":spring-boot-project:spring-boot-data-neo4j"))
optional(project(":spring-boot-project:spring-boot-data-redis"))
optional(project(":spring-boot-project:spring-boot-flyway")) optional(project(":spring-boot-project:spring-boot-flyway"))
optional(project(":spring-boot-project:spring-boot-groovy-templates")) optional(project(":spring-boot-project:spring-boot-groovy-templates"))
optional(project(":spring-boot-project:spring-boot-hateoas")) optional(project(":spring-boot-project:spring-boot-hateoas"))

View File

@ -1,6 +1,6 @@
# AutoConfigureDataRedis auto-configuration imports # AutoConfigureDataRedis auto-configuration imports
org.springframework.boot.autoconfigure.data.redis.RedisAutoConfiguration org.springframework.boot.data.redis.autoconfigure.RedisAutoConfiguration
org.springframework.boot.autoconfigure.data.redis.RedisReactiveAutoConfiguration org.springframework.boot.data.redis.autoconfigure.RedisReactiveAutoConfiguration
org.springframework.boot.autoconfigure.data.redis.RedisRepositoriesAutoConfiguration org.springframework.boot.data.redis.autoconfigure.RedisRepositoriesAutoConfiguration
org.springframework.boot.autoconfigure.ssl.SslAutoConfiguration org.springframework.boot.autoconfigure.ssl.SslAutoConfiguration
optional:org.springframework.boot.testcontainers.service.connection.ServiceConnectionAutoConfiguration optional:org.springframework.boot.testcontainers.service.connection.ServiceConnectionAutoConfiguration

View File

@ -66,6 +66,7 @@ dependencies {
optional(project(":spring-boot-project:spring-boot-actuator-autoconfigure")) optional(project(":spring-boot-project:spring-boot-actuator-autoconfigure"))
optional(project(":spring-boot-project:spring-boot-cassandra")) optional(project(":spring-boot-project:spring-boot-cassandra"))
optional(project(":spring-boot-project:spring-boot-couchbase")) optional(project(":spring-boot-project:spring-boot-couchbase"))
optional(project(":spring-boot-project:spring-boot-data-redis"))
optional(project(":spring-boot-project:spring-boot-elasticsearch")) optional(project(":spring-boot-project:spring-boot-elasticsearch"))
optional(project(":spring-boot-project:spring-boot-flyway")) optional(project(":spring-boot-project:spring-boot-flyway"))
optional(project(":spring-boot-project:spring-boot-hazelcast")) optional(project(":spring-boot-project:spring-boot-hazelcast"))

View File

@ -1,5 +1,5 @@
/* /*
* Copyright 2012-2024 the original author or authors. * Copyright 2012-2025 the original author or authors.
* *
* Licensed under the Apache License, Version 2.0 (the "License"); * Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License. * you may not use this file except in compliance with the License.
@ -27,8 +27,8 @@ import org.springframework.beans.factory.support.BeanDefinitionRegistry;
import org.springframework.beans.factory.support.BeanNameGenerator; import org.springframework.beans.factory.support.BeanNameGenerator;
import org.springframework.beans.factory.support.RootBeanDefinition; import org.springframework.beans.factory.support.RootBeanDefinition;
import org.springframework.boot.autoconfigure.ImportAutoConfiguration; import org.springframework.boot.autoconfigure.ImportAutoConfiguration;
import org.springframework.boot.autoconfigure.data.redis.RedisAutoConfiguration; import org.springframework.boot.data.redis.autoconfigure.RedisAutoConfiguration;
import org.springframework.boot.autoconfigure.data.redis.RedisConnectionDetails; import org.springframework.boot.data.redis.autoconfigure.RedisConnectionDetails;
import org.springframework.boot.testcontainers.beans.TestcontainerBeanDefinition; import org.springframework.boot.testcontainers.beans.TestcontainerBeanDefinition;
import org.springframework.boot.testcontainers.lifecycle.TestcontainersLifecycleApplicationContextInitializer; import org.springframework.boot.testcontainers.lifecycle.TestcontainersLifecycleApplicationContextInitializer;
import org.springframework.boot.testsupport.classpath.ClassPathExclusions; import org.springframework.boot.testsupport.classpath.ClassPathExclusions;

View File

@ -22,9 +22,9 @@ import com.redis.testcontainers.RedisContainer;
import com.redis.testcontainers.RedisStackContainer; import com.redis.testcontainers.RedisStackContainer;
import org.junit.jupiter.api.Test; import org.junit.jupiter.api.Test;
import org.springframework.boot.autoconfigure.data.redis.RedisConnectionDetails;
import org.springframework.boot.autoconfigure.service.connection.ConnectionDetails; import org.springframework.boot.autoconfigure.service.connection.ConnectionDetails;
import org.springframework.boot.autoconfigure.service.connection.ConnectionDetailsFactories; import org.springframework.boot.autoconfigure.service.connection.ConnectionDetailsFactories;
import org.springframework.boot.data.redis.autoconfigure.RedisConnectionDetails;
import org.springframework.boot.testcontainers.service.connection.ContainerConnectionSource; import org.springframework.boot.testcontainers.service.connection.ContainerConnectionSource;
import org.springframework.boot.testcontainers.service.connection.ServiceConnection; import org.springframework.boot.testcontainers.service.connection.ServiceConnection;
import org.springframework.boot.testcontainers.service.connection.TestContainerConnectionSource; import org.springframework.boot.testcontainers.service.connection.TestContainerConnectionSource;

View File

@ -1,5 +1,5 @@
/* /*
* Copyright 2012-2024 the original author or authors. * Copyright 2012-2025 the original author or authors.
* *
* Licensed under the Apache License, Version 2.0 (the "License"); * Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License. * you may not use this file except in compliance with the License.
@ -23,8 +23,8 @@ import org.testcontainers.junit.jupiter.Testcontainers;
import org.springframework.beans.factory.annotation.Autowired; import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.boot.autoconfigure.ImportAutoConfiguration; import org.springframework.boot.autoconfigure.ImportAutoConfiguration;
import org.springframework.boot.autoconfigure.data.redis.RedisAutoConfiguration; import org.springframework.boot.data.redis.autoconfigure.RedisAutoConfiguration;
import org.springframework.boot.autoconfigure.data.redis.RedisConnectionDetails; import org.springframework.boot.data.redis.autoconfigure.RedisConnectionDetails;
import org.springframework.boot.testcontainers.service.connection.ServiceConnection; import org.springframework.boot.testcontainers.service.connection.ServiceConnection;
import org.springframework.boot.testsupport.container.TestImage; import org.springframework.boot.testsupport.container.TestImage;
import org.springframework.context.annotation.Configuration; import org.springframework.context.annotation.Configuration;

View File

@ -1,5 +1,5 @@
/* /*
* Copyright 2012-2024 the original author or authors. * Copyright 2012-2025 the original author or authors.
* *
* Licensed under the Apache License, Version 2.0 (the "License"); * Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License. * you may not use this file except in compliance with the License.
@ -23,8 +23,8 @@ import org.testcontainers.junit.jupiter.Testcontainers;
import org.springframework.beans.factory.annotation.Autowired; import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.boot.autoconfigure.ImportAutoConfiguration; import org.springframework.boot.autoconfigure.ImportAutoConfiguration;
import org.springframework.boot.autoconfigure.data.redis.RedisAutoConfiguration; import org.springframework.boot.data.redis.autoconfigure.RedisAutoConfiguration;
import org.springframework.boot.autoconfigure.data.redis.RedisConnectionDetails; import org.springframework.boot.data.redis.autoconfigure.RedisConnectionDetails;
import org.springframework.boot.testcontainers.service.connection.ServiceConnection; import org.springframework.boot.testcontainers.service.connection.ServiceConnection;
import org.springframework.boot.testsupport.container.TestImage; import org.springframework.boot.testsupport.container.TestImage;
import org.springframework.context.annotation.Configuration; import org.springframework.context.annotation.Configuration;

View File

@ -1,5 +1,5 @@
/* /*
* Copyright 2012-2024 the original author or authors. * Copyright 2012-2025 the original author or authors.
* *
* Licensed under the Apache License, Version 2.0 (the "License"); * Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License. * you may not use this file except in compliance with the License.
@ -22,8 +22,8 @@ import org.testcontainers.junit.jupiter.Testcontainers;
import org.springframework.beans.factory.annotation.Autowired; import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.boot.autoconfigure.ImportAutoConfiguration; import org.springframework.boot.autoconfigure.ImportAutoConfiguration;
import org.springframework.boot.autoconfigure.data.redis.RedisAutoConfiguration; import org.springframework.boot.data.redis.autoconfigure.RedisAutoConfiguration;
import org.springframework.boot.autoconfigure.data.redis.RedisConnectionDetails; import org.springframework.boot.data.redis.autoconfigure.RedisConnectionDetails;
import org.springframework.boot.testcontainers.service.connection.ServiceConnection; import org.springframework.boot.testcontainers.service.connection.ServiceConnection;
import org.springframework.boot.testsupport.container.RedisStackServerContainer; import org.springframework.boot.testsupport.container.RedisStackServerContainer;
import org.springframework.boot.testsupport.container.TestImage; import org.springframework.boot.testsupport.container.TestImage;

View File

@ -23,7 +23,7 @@ import com.redis.testcontainers.RedisStackContainer;
import org.testcontainers.containers.Container; import org.testcontainers.containers.Container;
import org.testcontainers.containers.GenericContainer; import org.testcontainers.containers.GenericContainer;
import org.springframework.boot.autoconfigure.data.redis.RedisConnectionDetails; import org.springframework.boot.data.redis.autoconfigure.RedisConnectionDetails;
import org.springframework.boot.testcontainers.service.connection.ContainerConnectionDetailsFactory; import org.springframework.boot.testcontainers.service.connection.ContainerConnectionDetailsFactory;
import org.springframework.boot.testcontainers.service.connection.ContainerConnectionSource; import org.springframework.boot.testcontainers.service.connection.ContainerConnectionSource;
import org.springframework.boot.testcontainers.service.connection.ServiceConnection; import org.springframework.boot.testcontainers.service.connection.ServiceConnection;