Create spring-boot-data-redis module
This commit is contained in:
parent
95d1d2c70e
commit
81f87b2bc2
|
@ -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-mongodb"
|
||||
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-devtools"
|
||||
include "spring-boot-project:spring-boot-docker-compose"
|
||||
|
|
|
@ -26,6 +26,7 @@ dependencies {
|
|||
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-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-hazelcast"))
|
||||
optional(project(":spring-boot-project:spring-boot-http"))
|
||||
|
|
|
@ -26,7 +26,6 @@ import org.springframework.boot.autoconfigure.EnableAutoConfiguration;
|
|||
import org.springframework.boot.autoconfigure.condition.ConditionalOnBean;
|
||||
import org.springframework.boot.autoconfigure.condition.ConditionalOnClass;
|
||||
import org.springframework.boot.autoconfigure.condition.ConditionalOnMissingBean;
|
||||
import org.springframework.boot.autoconfigure.data.redis.RedisAutoConfiguration;
|
||||
import org.springframework.context.annotation.Bean;
|
||||
import org.springframework.data.redis.connection.RedisConnectionFactory;
|
||||
|
||||
|
@ -39,7 +38,8 @@ import org.springframework.data.redis.connection.RedisConnectionFactory;
|
|||
* @author Mark Paluch
|
||||
* @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)
|
||||
@ConditionalOnBean(RedisConnectionFactory.class)
|
||||
@ConditionalOnEnabledHealthIndicator("redis")
|
||||
|
|
|
@ -28,7 +28,6 @@ import org.springframework.boot.autoconfigure.EnableAutoConfiguration;
|
|||
import org.springframework.boot.autoconfigure.condition.ConditionalOnBean;
|
||||
import org.springframework.boot.autoconfigure.condition.ConditionalOnClass;
|
||||
import org.springframework.boot.autoconfigure.condition.ConditionalOnMissingBean;
|
||||
import org.springframework.boot.autoconfigure.data.redis.RedisReactiveAutoConfiguration;
|
||||
import org.springframework.context.annotation.Bean;
|
||||
import org.springframework.data.redis.connection.ReactiveRedisConnectionFactory;
|
||||
|
||||
|
@ -42,7 +41,7 @@ import org.springframework.data.redis.connection.ReactiveRedisConnectionFactory;
|
|||
* @author Mark Paluch
|
||||
* @since 2.1.0
|
||||
*/
|
||||
@AutoConfiguration(after = RedisReactiveAutoConfiguration.class)
|
||||
@AutoConfiguration(afterName = "org.springframework.boot.data.redis.autoconfigure.RedisReactiveAutoConfiguration")
|
||||
@ConditionalOnClass({ ReactiveRedisConnectionFactory.class, Flux.class })
|
||||
@ConditionalOnBean(ReactiveRedisConnectionFactory.class)
|
||||
@ConditionalOnEnabledHealthIndicator("redis")
|
||||
|
|
|
@ -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");
|
||||
* 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.ConditionalOnClass;
|
||||
import org.springframework.boot.autoconfigure.condition.ConditionalOnMissingBean;
|
||||
import org.springframework.boot.autoconfigure.data.redis.ClientResourcesBuilderCustomizer;
|
||||
import org.springframework.boot.autoconfigure.data.redis.RedisAutoConfiguration;
|
||||
import org.springframework.boot.data.redis.autoconfigure.ClientResourcesBuilderCustomizer;
|
||||
import org.springframework.context.annotation.Bean;
|
||||
|
||||
/**
|
||||
|
@ -38,9 +37,10 @@ import org.springframework.context.annotation.Bean;
|
|||
* @author Yanming Zhou
|
||||
* @since 2.6.0
|
||||
*/
|
||||
@AutoConfiguration(before = RedisAutoConfiguration.class,
|
||||
@AutoConfiguration(beforeName = "org.springframework.boot.data.redis.autoconfigure.RedisAutoConfiguration",
|
||||
after = { MetricsAutoConfiguration.class, CompositeMeterRegistryAutoConfiguration.class })
|
||||
@ConditionalOnClass({ RedisClient.class, MicrometerCommandLatencyRecorder.class })
|
||||
@ConditionalOnClass({ ClientResourcesBuilderCustomizer.class, RedisClient.class,
|
||||
MicrometerCommandLatencyRecorder.class })
|
||||
@ConditionalOnBean(MeterRegistry.class)
|
||||
public class LettuceMetricsAutoConfiguration {
|
||||
|
||||
|
|
|
@ -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");
|
||||
* 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.RedisReactiveHealthIndicator;
|
||||
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.testsupport.classpath.ClassPathExclusions;
|
||||
|
||||
|
|
|
@ -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");
|
||||
* 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.RedisReactiveHealthIndicator;
|
||||
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 static org.assertj.core.api.Assertions.assertThat;
|
||||
|
|
|
@ -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.ReactiveHealthEndpointWebExtension;
|
||||
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.cassandra.autoconfigure.CassandraAutoConfiguration;
|
||||
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.neo4j.autoconfigure.Neo4jDataAutoConfiguration;
|
||||
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.hazelcast.autoconfigure.HazelcastAutoConfiguration;
|
||||
import org.springframework.boot.liquibase.autoconfigure.LiquibaseAutoConfiguration;
|
||||
|
|
|
@ -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");
|
||||
* 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.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.context.annotation.Bean;
|
||||
import org.springframework.context.annotation.Configuration;
|
||||
|
|
|
@ -26,6 +26,7 @@ dependencies {
|
|||
|
||||
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-redis"))
|
||||
optional(project(":spring-boot-project:spring-boot-flyway"))
|
||||
optional(project(":spring-boot-project:spring-boot-http"))
|
||||
optional(project(":spring-boot-project:spring-boot-integration"))
|
||||
|
|
|
@ -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");
|
||||
* 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.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.runner.ApplicationContextRunner;
|
||||
import org.springframework.boot.test.context.runner.ContextConsumer;
|
||||
|
|
|
@ -43,6 +43,7 @@ dependencies {
|
|||
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-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-h2console"))
|
||||
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-mongodb")
|
||||
optional("org.springframework.data:spring-data-r2dbc")
|
||||
optional("org.springframework.data:spring-data-redis")
|
||||
optional("org.springframework.graphql:spring-graphql")
|
||||
optional("org.springframework.hateoas:spring-hateoas")
|
||||
optional("org.springframework.security:spring-security-acl")
|
||||
|
@ -183,7 +183,6 @@ dependencies {
|
|||
optional("org.springframework.session:spring-session-jdbc")
|
||||
optional("org.springframework.amqp:spring-rabbit")
|
||||
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-gson"))
|
||||
|
|
|
@ -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");
|
||||
* 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 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.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.assertj.AssertableReactiveWebApplicationContext;
|
||||
import org.springframework.boot.test.context.runner.ContextConsumer;
|
||||
|
|
|
@ -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");
|
||||
* 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.springframework.boot.autoconfigure.AutoConfigurations;
|
||||
import org.springframework.boot.autoconfigure.data.redis.RedisAutoConfiguration;
|
||||
import org.springframework.boot.autoconfigure.web.ServerProperties;
|
||||
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.assertj.AssertableWebApplicationContext;
|
||||
import org.springframework.boot.test.context.runner.ContextConsumer;
|
||||
|
|
|
@ -26,7 +26,6 @@ import org.springframework.boot.autoconfigure.condition.ConditionalOnBean;
|
|||
import org.springframework.boot.autoconfigure.condition.ConditionalOnClass;
|
||||
import org.springframework.boot.autoconfigure.condition.ConditionalOnMissingBean;
|
||||
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.jpa.autoconfigure.EntityManagerFactoryDependsOnPostProcessor;
|
||||
import org.springframework.cache.CacheManager;
|
||||
|
@ -52,8 +51,9 @@ import org.springframework.util.Assert;
|
|||
* @since 1.3.0
|
||||
* @see EnableCaching
|
||||
*/
|
||||
@AutoConfiguration(after = { CouchbaseDataAutoConfiguration.class, RedisAutoConfiguration.class },
|
||||
afterName = { "org.springframework.boot.hazelcast.autoconfigure.HazelcastAutoConfiguration",
|
||||
@AutoConfiguration(after = CouchbaseDataAutoConfiguration.class,
|
||||
afterName = { "org.springframework.boot.data.redis.autoconfigure.RedisAutoConfiguration",
|
||||
"org.springframework.boot.hazelcast.autoconfigure.HazelcastAutoConfiguration",
|
||||
"org.springframework.boot.jpa.autoconfigure.hibernate.HibernateJpaAutoConfiguration" })
|
||||
@ConditionalOnClass(CacheManager.class)
|
||||
@ConditionalOnBean(CacheAspectSupport.class)
|
||||
|
|
|
@ -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");
|
||||
* 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.ConditionalOnClass;
|
||||
import org.springframework.boot.autoconfigure.condition.ConditionalOnMissingBean;
|
||||
import org.springframework.boot.autoconfigure.data.redis.RedisAutoConfiguration;
|
||||
import org.springframework.cache.CacheManager;
|
||||
import org.springframework.context.annotation.Bean;
|
||||
import org.springframework.context.annotation.Conditional;
|
||||
|
@ -46,7 +45,7 @@ import org.springframework.data.redis.serializer.RedisSerializationContext.Seria
|
|||
*/
|
||||
@Configuration(proxyBeanMethods = false)
|
||||
@ConditionalOnClass(RedisConnectionFactory.class)
|
||||
@AutoConfigureAfter(RedisAutoConfiguration.class)
|
||||
@AutoConfigureAfter(name = "org.springframework.boot.data.redis.autoconfigure.RedisAutoConfiguration")
|
||||
@ConditionalOnBean(RedisConnectionFactory.class)
|
||||
@ConditionalOnMissingBean(CacheManager.class)
|
||||
@Conditional(CacheCondition.class)
|
||||
|
|
|
@ -27,8 +27,6 @@ import org.springframework.boot.autoconfigure.condition.ConditionalOnClass;
|
|||
import org.springframework.boot.autoconfigure.condition.ConditionalOnMissingBean;
|
||||
import org.springframework.boot.autoconfigure.condition.ConditionalOnWebApplication;
|
||||
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.reactive.HttpHandlerAutoConfiguration;
|
||||
import org.springframework.boot.autoconfigure.web.reactive.WebFluxAutoConfiguration;
|
||||
|
@ -63,14 +61,14 @@ import org.springframework.session.web.http.HttpSessionIdResolver;
|
|||
* @author Weix Sun
|
||||
* @since 1.4.0
|
||||
*/
|
||||
@AutoConfiguration(
|
||||
after = { RedisAutoConfiguration.class, RedisReactiveAutoConfiguration.class,
|
||||
WebSessionIdResolverAutoConfiguration.class },
|
||||
@AutoConfiguration(after = WebSessionIdResolverAutoConfiguration.class,
|
||||
afterName = { "org.springframework.boot.hazelcast.autoconfigure.HazelcastAutoConfiguration",
|
||||
"org.springframework.boot.jdbc.autoconfigure.DataSourceAutoConfiguration",
|
||||
"org.springframework.boot.jdbc.autoconfigure.JdbcTemplateAutoConfiguration",
|
||||
"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 })
|
||||
@ConditionalOnClass(Session.class)
|
||||
@ConditionalOnWebApplication
|
||||
|
|
|
@ -44,20 +44,6 @@
|
|||
"description": "Whether to enable R2DBC repositories.",
|
||||
"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",
|
||||
"defaultValue": ".graphqls,.gqls"
|
||||
|
@ -294,258 +280,6 @@
|
|||
"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",
|
||||
"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",
|
||||
"values": [
|
||||
|
|
|
@ -1,7 +1,3 @@
|
|||
# Failure Analyzers
|
||||
org.springframework.boot.diagnostics.FailureAnalyzer=\
|
||||
org.springframework.boot.autoconfigure.data.redis.RedisUrlSyntaxFailureAnalyzer
|
||||
|
||||
# Depends on Database Initialization Detectors
|
||||
org.springframework.boot.sql.init.dependency.DependsOnDatabaseInitializationDetector=\
|
||||
org.springframework.boot.autoconfigure.session.JdbcIndexedSessionRepositoryDependsOnDatabaseInitializationDetector
|
||||
|
|
|
@ -8,9 +8,6 @@ org.springframework.boot.autoconfigure.data.couchbase.CouchbaseRepositoriesAutoC
|
|||
org.springframework.boot.autoconfigure.data.jdbc.JdbcRepositoriesAutoConfiguration
|
||||
org.springframework.boot.autoconfigure.data.r2dbc.R2dbcDataAutoConfiguration
|
||||
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.web.SpringDataWebAutoConfiguration
|
||||
org.springframework.boot.autoconfigure.graphql.GraphQlAutoConfiguration
|
||||
|
|
|
@ -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")
|
||||
}
|
|
@ -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");
|
||||
* you may not use this file except in compliance with the License.
|
||||
|
@ -14,7 +14,7 @@
|
|||
* limitations under the License.
|
||||
*/
|
||||
|
||||
package org.springframework.boot.autoconfigure.data.redis;
|
||||
package org.springframework.boot.data.redis.autoconfigure;
|
||||
|
||||
import com.redis.testcontainers.RedisContainer;
|
||||
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.context.PropertyPlaceholderAutoConfiguration;
|
||||
import org.springframework.boot.autoconfigure.data.alt.redis.CityRedisRepository;
|
||||
import org.springframework.boot.autoconfigure.data.empty.EmptyDataPackage;
|
||||
import org.springframework.boot.autoconfigure.data.redis.city.City;
|
||||
import org.springframework.boot.autoconfigure.data.redis.city.CityRepository;
|
||||
import org.springframework.boot.data.redis.domain.city.City;
|
||||
import org.springframework.boot.data.redis.domain.city.CityRepository;
|
||||
import org.springframework.boot.data.redis.domain.empty.EmptyPackage;
|
||||
import org.springframework.boot.test.util.TestPropertyValues;
|
||||
import org.springframework.boot.testsupport.container.TestImage;
|
||||
import org.springframework.context.annotation.AnnotationConfigApplicationContext;
|
||||
|
@ -83,7 +82,7 @@ class RedisRepositoriesAutoConfigurationTests {
|
|||
this.context.register(CustomizedConfiguration.class, RedisAutoConfiguration.class,
|
||||
RedisRepositoriesAutoConfiguration.class, PropertyPlaceholderAutoConfiguration.class);
|
||||
this.context.refresh();
|
||||
assertThat(this.context.getBean(CityRedisRepository.class)).isNotNull();
|
||||
assertThat(this.context.getBean(CityRepository.class)).isNotNull();
|
||||
}
|
||||
|
||||
@Configuration(proxyBeanMethods = false)
|
||||
|
@ -93,14 +92,14 @@ class RedisRepositoriesAutoConfigurationTests {
|
|||
}
|
||||
|
||||
@Configuration(proxyBeanMethods = false)
|
||||
@TestAutoConfigurationPackage(EmptyDataPackage.class)
|
||||
@TestAutoConfigurationPackage(EmptyPackage.class)
|
||||
static class EmptyConfiguration {
|
||||
|
||||
}
|
||||
|
||||
@Configuration(proxyBeanMethods = false)
|
||||
@TestAutoConfigurationPackage(RedisRepositoriesAutoConfigurationTests.class)
|
||||
@EnableRedisRepositories(basePackageClasses = CityRedisRepository.class)
|
||||
@EnableRedisRepositories(basePackageClasses = CityRepository.class)
|
||||
static class CustomizedConfiguration {
|
||||
|
||||
}
|
|
@ -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");
|
||||
* you may not use this file except in compliance with the License.
|
||||
|
@ -14,7 +14,7 @@
|
|||
* 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.Builder;
|
||||
|
@ -25,7 +25,7 @@ import io.lettuce.core.resource.ClientResources.Builder;
|
|||
* auto-configuration.
|
||||
*
|
||||
* @author Stephane Nicoll
|
||||
* @since 2.6.0
|
||||
* @since 4.0.0
|
||||
*/
|
||||
public interface ClientResourcesBuilderCustomizer {
|
||||
|
|
@ -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");
|
||||
* you may not use this file except in compliance with the License.
|
||||
|
@ -14,7 +14,7 @@
|
|||
* 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.JedisClientConfigurationBuilder;
|
||||
|
@ -26,7 +26,7 @@ import org.springframework.data.redis.connection.jedis.JedisClientConfiguration.
|
|||
* auto-configuration.
|
||||
*
|
||||
* @author Mark Paluch
|
||||
* @since 2.0.0
|
||||
* @since 4.0.0
|
||||
*/
|
||||
@FunctionalInterface
|
||||
public interface JedisClientConfigurationBuilderCustomizer {
|
|
@ -14,7 +14,7 @@
|
|||
* limitations under the License.
|
||||
*/
|
||||
|
||||
package org.springframework.boot.autoconfigure.data.redis;
|
||||
package org.springframework.boot.data.redis.autoconfigure;
|
||||
|
||||
import javax.net.ssl.SSLParameters;
|
||||
|
|
@ -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");
|
||||
* you may not use this file except in compliance with the License.
|
||||
|
@ -14,7 +14,7 @@
|
|||
* 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.LettuceClientConfigurationBuilder;
|
||||
|
@ -28,7 +28,7 @@ import org.springframework.data.redis.connection.lettuce.LettuceClientConfigurat
|
|||
* configuration, use {@link LettuceClientOptionsBuilderCustomizer} instead.
|
||||
*
|
||||
* @author Mark Paluch
|
||||
* @since 2.0.0
|
||||
* @since 4.0.0
|
||||
*/
|
||||
@FunctionalInterface
|
||||
public interface LettuceClientConfigurationBuilderCustomizer {
|
|
@ -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");
|
||||
* you may not use this file except in compliance with the License.
|
||||
|
@ -14,7 +14,7 @@
|
|||
* 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.Builder;
|
||||
|
@ -28,7 +28,7 @@ import org.springframework.data.redis.connection.lettuce.LettuceClientConfigurat
|
|||
* configuration, use {@link LettuceClientConfigurationBuilderCustomizer} instead.
|
||||
*
|
||||
* @author Soohyun Lim
|
||||
* @since 3.4.0
|
||||
* @since 4.0.0
|
||||
*/
|
||||
@FunctionalInterface
|
||||
public interface LettuceClientOptionsBuilderCustomizer {
|
|
@ -14,7 +14,7 @@
|
|||
* limitations under the License.
|
||||
*/
|
||||
|
||||
package org.springframework.boot.autoconfigure.data.redis;
|
||||
package org.springframework.boot.data.redis.autoconfigure;
|
||||
|
||||
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.ConditionalOnProperty;
|
||||
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.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.SslBundles;
|
||||
import org.springframework.boot.ssl.SslOptions;
|
|
@ -14,7 +14,7 @@
|
|||
* limitations under the License.
|
||||
*/
|
||||
|
||||
package org.springframework.boot.autoconfigure.data.redis;
|
||||
package org.springframework.boot.data.redis.autoconfigure;
|
||||
|
||||
import java.util.List;
|
||||
|
|
@ -14,7 +14,7 @@
|
|||
* 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.boot.autoconfigure.AutoConfiguration;
|
||||
|
@ -43,7 +43,7 @@ import org.springframework.data.redis.core.StringRedisTemplate;
|
|||
* @author Stephane Nicoll
|
||||
* @author Marco Aust
|
||||
* @author Mark Paluch
|
||||
* @since 1.0.0
|
||||
* @since 4.0.0
|
||||
*/
|
||||
@AutoConfiguration
|
||||
@ConditionalOnClass(RedisOperations.class)
|
|
@ -14,16 +14,16 @@
|
|||
* 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.List;
|
||||
|
||||
import org.springframework.beans.factory.ObjectProvider;
|
||||
import org.springframework.boot.autoconfigure.data.redis.RedisConnectionDetails.Cluster;
|
||||
import org.springframework.boot.autoconfigure.data.redis.RedisConnectionDetails.Node;
|
||||
import org.springframework.boot.autoconfigure.data.redis.RedisConnectionDetails.Sentinel;
|
||||
import org.springframework.boot.autoconfigure.data.redis.RedisProperties.Pool;
|
||||
import org.springframework.boot.data.redis.autoconfigure.RedisConnectionDetails.Cluster;
|
||||
import org.springframework.boot.data.redis.autoconfigure.RedisConnectionDetails.Node;
|
||||
import org.springframework.boot.data.redis.autoconfigure.RedisConnectionDetails.Sentinel;
|
||||
import org.springframework.boot.data.redis.autoconfigure.RedisProperties.Pool;
|
||||
import org.springframework.boot.ssl.SslBundle;
|
||||
import org.springframework.boot.ssl.SslBundles;
|
||||
import org.springframework.data.redis.connection.RedisClusterConfiguration;
|
|
@ -14,7 +14,7 @@
|
|||
* limitations under the License.
|
||||
*/
|
||||
|
||||
package org.springframework.boot.autoconfigure.data.redis;
|
||||
package org.springframework.boot.data.redis.autoconfigure;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
|
@ -27,7 +27,7 @@ import org.springframework.util.Assert;
|
|||
*
|
||||
* @author Moritz Halbritter
|
||||
* @author Andy Wilkinson
|
||||
* @since 3.1.0
|
||||
* @since 4.0.0
|
||||
*/
|
||||
public interface RedisConnectionDetails extends ConnectionDetails {
|
||||
|
|
@ -14,7 +14,7 @@
|
|||
* limitations under the License.
|
||||
*/
|
||||
|
||||
package org.springframework.boot.autoconfigure.data.redis;
|
||||
package org.springframework.boot.data.redis.autoconfigure;
|
||||
|
||||
import java.time.Duration;
|
||||
import java.util.List;
|
||||
|
@ -32,7 +32,7 @@ import org.springframework.boot.context.properties.ConfigurationProperties;
|
|||
* @author Stephane Nicoll
|
||||
* @author Scott Frederick
|
||||
* @author Yanming Zhou
|
||||
* @since 1.0.0
|
||||
* @since 4.0.0
|
||||
*/
|
||||
@ConfigurationProperties("spring.data.redis")
|
||||
public class RedisProperties {
|
|
@ -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");
|
||||
* you may not use this file except in compliance with the License.
|
||||
|
@ -14,7 +14,7 @@
|
|||
* limitations under the License.
|
||||
*/
|
||||
|
||||
package org.springframework.boot.autoconfigure.data.redis;
|
||||
package org.springframework.boot.data.redis.autoconfigure;
|
||||
|
||||
import reactor.core.publisher.Flux;
|
||||
|
||||
|
@ -37,7 +37,7 @@ import org.springframework.data.redis.serializer.RedisSerializer;
|
|||
*
|
||||
* @author Mark Paluch
|
||||
* @author Stephane Nicoll
|
||||
* @since 2.0.0
|
||||
* @since 4.0.0
|
||||
*/
|
||||
@AutoConfiguration(after = RedisAutoConfiguration.class)
|
||||
@ConditionalOnClass({ ReactiveRedisConnectionFactory.class, ReactiveRedisTemplate.class, Flux.class })
|
|
@ -14,7 +14,7 @@
|
|||
* 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.EnableAutoConfiguration;
|
||||
|
@ -33,7 +33,7 @@ import org.springframework.data.redis.repository.support.RedisRepositoryFactoryB
|
|||
*
|
||||
* @author Eddú Meléndez
|
||||
* @author Stephane Nicoll
|
||||
* @since 1.4.0
|
||||
* @since 4.0.0
|
||||
* @see EnableRedisRepositories
|
||||
*/
|
||||
@AutoConfiguration(after = RedisAutoConfiguration.class)
|
|
@ -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");
|
||||
* you may not use this file except in compliance with the License.
|
||||
|
@ -14,7 +14,7 @@
|
|||
* limitations under the License.
|
||||
*/
|
||||
|
||||
package org.springframework.boot.autoconfigure.data.redis;
|
||||
package org.springframework.boot.data.redis.autoconfigure;
|
||||
|
||||
import java.lang.annotation.Annotation;
|
||||
|
|
@ -14,7 +14,7 @@
|
|||
* 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.URISyntaxException;
|
|
@ -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");
|
||||
* you may not use this file except in compliance with the License.
|
||||
|
@ -14,7 +14,7 @@
|
|||
* 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.
|
|
@ -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");
|
||||
* you may not use this file except in compliance with the License.
|
||||
|
@ -14,7 +14,7 @@
|
|||
* 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.URISyntaxException;
|
|
@ -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");
|
||||
* you may not use this file except in compliance with the License.
|
||||
|
@ -17,4 +17,4 @@
|
|||
/**
|
||||
* Auto-configuration for Spring Data Redis.
|
||||
*/
|
||||
package org.springframework.boot.autoconfigure.data.redis;
|
||||
package org.springframework.boot.data.redis.autoconfigure;
|
|
@ -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"
|
||||
}
|
||||
]
|
||||
}
|
||||
]
|
||||
}
|
|
@ -0,0 +1,4 @@
|
|||
# Failure Analyzers
|
||||
org.springframework.boot.diagnostics.FailureAnalyzer=\
|
||||
org.springframework.boot.data.redis.autoconfigure.RedisUrlSyntaxFailureAnalyzer
|
||||
|
|
@ -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
|
|
@ -14,14 +14,14 @@
|
|||
* limitations under the License.
|
||||
*/
|
||||
|
||||
package org.springframework.boot.autoconfigure.data.redis;
|
||||
package org.springframework.boot.data.redis.autoconfigure;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
import org.junit.jupiter.api.BeforeEach;
|
||||
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.SslBundle;
|
||||
|
|
@ -14,7 +14,7 @@
|
|||
* limitations under the License.
|
||||
*/
|
||||
|
||||
package org.springframework.boot.autoconfigure.data.redis;
|
||||
package org.springframework.boot.data.redis.autoconfigure;
|
||||
|
||||
import java.time.Duration;
|
||||
|
|
@ -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");
|
||||
* you may not use this file except in compliance with the License.
|
||||
|
@ -14,7 +14,7 @@
|
|||
* limitations under the License.
|
||||
*/
|
||||
|
||||
package org.springframework.boot.autoconfigure.data.redis;
|
||||
package org.springframework.boot.data.redis.autoconfigure;
|
||||
|
||||
import org.junit.jupiter.api.Test;
|
||||
|
|
@ -14,7 +14,7 @@
|
|||
* limitations under the License.
|
||||
*/
|
||||
|
||||
package org.springframework.boot.autoconfigure.data.redis;
|
||||
package org.springframework.boot.data.redis.autoconfigure;
|
||||
|
||||
import java.time.Duration;
|
||||
import java.util.Arrays;
|
||||
|
@ -45,8 +45,8 @@ import org.junit.jupiter.params.provider.Arguments;
|
|||
import org.junit.jupiter.params.provider.MethodSource;
|
||||
|
||||
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.data.redis.autoconfigure.RedisProperties.Pool;
|
||||
import org.springframework.boot.test.context.assertj.AssertableApplicationContext;
|
||||
import org.springframework.boot.test.context.runner.ApplicationContextRunner;
|
||||
import org.springframework.boot.test.context.runner.ContextConsumer;
|
|
@ -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");
|
||||
* you may not use this file except in compliance with the License.
|
||||
|
@ -14,12 +14,12 @@
|
|||
* 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 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;
|
||||
|
|
@ -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");
|
||||
* you may not use this file except in compliance with the License.
|
||||
|
@ -14,7 +14,7 @@
|
|||
* limitations under the License.
|
||||
*/
|
||||
|
||||
package org.springframework.boot.autoconfigure.data.redis;
|
||||
package org.springframework.boot.data.redis.autoconfigure;
|
||||
|
||||
import java.util.Map;
|
||||
|
|
@ -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");
|
||||
* you may not use this file except in compliance with the License.
|
||||
|
@ -14,7 +14,7 @@
|
|||
* limitations under the License.
|
||||
*/
|
||||
|
||||
package org.springframework.boot.autoconfigure.data.redis;
|
||||
package org.springframework.boot.data.redis.autoconfigure;
|
||||
|
||||
import org.junit.jupiter.api.Test;
|
||||
|
|
@ -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");
|
||||
* you may not use this file except in compliance with the License.
|
||||
|
@ -14,7 +14,7 @@
|
|||
* limitations under the License.
|
||||
*/
|
||||
|
||||
package org.springframework.boot.autoconfigure.data.redis.city;
|
||||
package org.springframework.boot.data.redis.domain.city;
|
||||
|
||||
import java.io.Serializable;
|
||||
|
|
@ -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");
|
||||
* you may not use this file except in compliance with the License.
|
||||
|
@ -14,7 +14,7 @@
|
|||
* 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.Pageable;
|
|
@ -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");
|
||||
* you may not use this file except in compliance with the License.
|
||||
|
@ -14,11 +14,8 @@
|
|||
* 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;
|
||||
import org.springframework.data.repository.Repository;
|
||||
|
||||
public interface CityRedisRepository extends Repository<City, Long> {
|
||||
public class EmptyPackage {
|
||||
|
||||
}
|
|
@ -2031,6 +2031,7 @@ bom {
|
|||
"spring-boot-data-ldap",
|
||||
"spring-boot-data-mongodb",
|
||||
"spring-boot-data-neo4j",
|
||||
"spring-boot-data-redis",
|
||||
"spring-boot-devtools",
|
||||
"spring-boot-docker-compose",
|
||||
"spring-boot-elasticsearch",
|
||||
|
|
|
@ -40,6 +40,7 @@ dependencies {
|
|||
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-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-flyway"))
|
||||
optional(project(":spring-boot-project:spring-boot-hazelcast"))
|
||||
|
|
|
@ -18,8 +18,8 @@ package org.springframework.boot.docker.compose.service.connection.redis;
|
|||
|
||||
import javax.net.ssl.SSLContext;
|
||||
|
||||
import org.springframework.boot.autoconfigure.data.redis.RedisConnectionDetails;
|
||||
import org.springframework.boot.autoconfigure.data.redis.RedisConnectionDetails.Standalone;
|
||||
import org.springframework.boot.data.redis.autoconfigure.RedisConnectionDetails;
|
||||
import org.springframework.boot.data.redis.autoconfigure.RedisConnectionDetails.Standalone;
|
||||
import org.springframework.boot.docker.compose.service.connection.test.DockerComposeTest;
|
||||
import org.springframework.boot.ssl.SslBundle;
|
||||
import org.springframework.boot.testsupport.container.TestImage;
|
||||
|
|
|
@ -16,7 +16,7 @@
|
|||
|
||||
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.service.connection.DockerComposeConnectionDetailsFactory;
|
||||
import org.springframework.boot.docker.compose.service.connection.DockerComposeConnectionSource;
|
||||
|
|
|
@ -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-mongodb", 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-elasticsearch", 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-ldap", 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-docker-compose", configuration: "configurationPropertiesMetadata"))
|
||||
configurationProperties(project(path: ":spring-boot-project:spring-boot-elasticsearch", configuration: "configurationPropertiesMetadata"))
|
||||
|
|
|
@ -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.
|
||||
javadoc:io.lettuce.core.resource.ClientResources[] can also be customized using javadoc:org.springframework.boot.autoconfigure.data.redis.ClientResourcesBuilderCustomizer[].
|
||||
If you use Jedis, javadoc:org.springframework.boot.autoconfigure.data.redis.JedisClientConfigurationBuilderCustomizer[] is also available.
|
||||
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.data.redis.autoconfigure.ClientResourcesBuilderCustomizer[].
|
||||
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.
|
||||
|
||||
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).
|
||||
|
|
|
@ -128,7 +128,7 @@ The following service connections are currently supported:
|
|||
| javadoc:org.springframework.boot.autoconfigure.amqp.RabbitConnectionDetails[]
|
||||
| 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"
|
||||
|
||||
| javadoc:org.springframework.boot.actuate.autoconfigure.tracing.zipkin.ZipkinConnectionDetails[]
|
||||
|
|
|
@ -92,7 +92,7 @@ The following service connection factories are provided in the `spring-boot-test
|
|||
| javadoc:org.springframework.boot.autoconfigure.amqp.RabbitConnectionDetails[]
|
||||
| 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"
|
||||
|
||||
| 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.
|
||||
|
||||
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.
|
||||
|
||||
|
||||
|
||||
|
|
|
@ -6,8 +6,7 @@ description = "Starter for using Redis key-value data store with Spring Data Red
|
|||
|
||||
dependencies {
|
||||
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("io.lettuce:lettuce-core")
|
||||
api("io.projectreactor:reactor-core")
|
||||
api("org.springframework.data:spring-data-redis")
|
||||
}
|
||||
|
|
|
@ -6,7 +6,6 @@ description = "Starter for using Redis key-value data store with Spring Data Red
|
|||
|
||||
dependencies {
|
||||
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("io.lettuce:lettuce-core")
|
||||
api("org.springframework.data:spring-data-redis")
|
||||
}
|
||||
|
|
|
@ -43,6 +43,7 @@ dependencies {
|
|||
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-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-groovy-templates"))
|
||||
optional(project(":spring-boot-project:spring-boot-hateoas"))
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
# AutoConfigureDataRedis auto-configuration imports
|
||||
org.springframework.boot.autoconfigure.data.redis.RedisAutoConfiguration
|
||||
org.springframework.boot.autoconfigure.data.redis.RedisReactiveAutoConfiguration
|
||||
org.springframework.boot.autoconfigure.data.redis.RedisRepositoriesAutoConfiguration
|
||||
org.springframework.boot.data.redis.autoconfigure.RedisAutoConfiguration
|
||||
org.springframework.boot.data.redis.autoconfigure.RedisReactiveAutoConfiguration
|
||||
org.springframework.boot.data.redis.autoconfigure.RedisRepositoriesAutoConfiguration
|
||||
org.springframework.boot.autoconfigure.ssl.SslAutoConfiguration
|
||||
optional:org.springframework.boot.testcontainers.service.connection.ServiceConnectionAutoConfiguration
|
||||
|
|
|
@ -66,6 +66,7 @@ dependencies {
|
|||
optional(project(":spring-boot-project:spring-boot-actuator-autoconfigure"))
|
||||
optional(project(":spring-boot-project:spring-boot-cassandra"))
|
||||
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-flyway"))
|
||||
optional(project(":spring-boot-project:spring-boot-hazelcast"))
|
||||
|
|
|
@ -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");
|
||||
* 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.RootBeanDefinition;
|
||||
import org.springframework.boot.autoconfigure.ImportAutoConfiguration;
|
||||
import org.springframework.boot.autoconfigure.data.redis.RedisAutoConfiguration;
|
||||
import org.springframework.boot.autoconfigure.data.redis.RedisConnectionDetails;
|
||||
import org.springframework.boot.data.redis.autoconfigure.RedisAutoConfiguration;
|
||||
import org.springframework.boot.data.redis.autoconfigure.RedisConnectionDetails;
|
||||
import org.springframework.boot.testcontainers.beans.TestcontainerBeanDefinition;
|
||||
import org.springframework.boot.testcontainers.lifecycle.TestcontainersLifecycleApplicationContextInitializer;
|
||||
import org.springframework.boot.testsupport.classpath.ClassPathExclusions;
|
||||
|
|
|
@ -22,9 +22,9 @@ import com.redis.testcontainers.RedisContainer;
|
|||
import com.redis.testcontainers.RedisStackContainer;
|
||||
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.ConnectionDetailsFactories;
|
||||
import org.springframework.boot.data.redis.autoconfigure.RedisConnectionDetails;
|
||||
import org.springframework.boot.testcontainers.service.connection.ContainerConnectionSource;
|
||||
import org.springframework.boot.testcontainers.service.connection.ServiceConnection;
|
||||
import org.springframework.boot.testcontainers.service.connection.TestContainerConnectionSource;
|
||||
|
|
|
@ -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");
|
||||
* 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.boot.autoconfigure.ImportAutoConfiguration;
|
||||
import org.springframework.boot.autoconfigure.data.redis.RedisAutoConfiguration;
|
||||
import org.springframework.boot.autoconfigure.data.redis.RedisConnectionDetails;
|
||||
import org.springframework.boot.data.redis.autoconfigure.RedisAutoConfiguration;
|
||||
import org.springframework.boot.data.redis.autoconfigure.RedisConnectionDetails;
|
||||
import org.springframework.boot.testcontainers.service.connection.ServiceConnection;
|
||||
import org.springframework.boot.testsupport.container.TestImage;
|
||||
import org.springframework.context.annotation.Configuration;
|
||||
|
|
|
@ -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");
|
||||
* 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.boot.autoconfigure.ImportAutoConfiguration;
|
||||
import org.springframework.boot.autoconfigure.data.redis.RedisAutoConfiguration;
|
||||
import org.springframework.boot.autoconfigure.data.redis.RedisConnectionDetails;
|
||||
import org.springframework.boot.data.redis.autoconfigure.RedisAutoConfiguration;
|
||||
import org.springframework.boot.data.redis.autoconfigure.RedisConnectionDetails;
|
||||
import org.springframework.boot.testcontainers.service.connection.ServiceConnection;
|
||||
import org.springframework.boot.testsupport.container.TestImage;
|
||||
import org.springframework.context.annotation.Configuration;
|
||||
|
|
|
@ -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");
|
||||
* 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.boot.autoconfigure.ImportAutoConfiguration;
|
||||
import org.springframework.boot.autoconfigure.data.redis.RedisAutoConfiguration;
|
||||
import org.springframework.boot.autoconfigure.data.redis.RedisConnectionDetails;
|
||||
import org.springframework.boot.data.redis.autoconfigure.RedisAutoConfiguration;
|
||||
import org.springframework.boot.data.redis.autoconfigure.RedisConnectionDetails;
|
||||
import org.springframework.boot.testcontainers.service.connection.ServiceConnection;
|
||||
import org.springframework.boot.testsupport.container.RedisStackServerContainer;
|
||||
import org.springframework.boot.testsupport.container.TestImage;
|
||||
|
|
|
@ -23,7 +23,7 @@ import com.redis.testcontainers.RedisStackContainer;
|
|||
import org.testcontainers.containers.Container;
|
||||
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.ContainerConnectionSource;
|
||||
import org.springframework.boot.testcontainers.service.connection.ServiceConnection;
|
||||
|
|
Loading…
Reference in New Issue