Skip to content

Commit 11c1801

Browse files
committed
Create spring-boot-data-redis module
1 parent 1a0a628 commit 11c1801

File tree

72 files changed

+499
-463
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

72 files changed

+499
-463
lines changed

settings.gradle

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -58,6 +58,7 @@ include "spring-boot-project:spring-boot-data-jpa"
5858
include "spring-boot-project:spring-boot-data-ldap"
5959
include "spring-boot-project:spring-boot-data-mongodb"
6060
include "spring-boot-project:spring-boot-data-neo4j"
61+
include "spring-boot-project:spring-boot-data-redis"
6162
include "spring-boot-project:spring-boot-dependencies"
6263
include "spring-boot-project:spring-boot-devtools"
6364
include "spring-boot-project:spring-boot-docker-compose"

spring-boot-project/spring-boot-actuator-autoconfigure/build.gradle

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -26,6 +26,7 @@ dependencies {
2626
optional(project(":spring-boot-project:spring-boot-data-jpa"))
2727
optional(project(":spring-boot-project:spring-boot-data-mongodb"))
2828
optional(project(":spring-boot-project:spring-boot-data-neo4j"))
29+
optional(project(":spring-boot-project:spring-boot-data-redis"))
2930
optional(project(":spring-boot-project:spring-boot-flyway"))
3031
optional(project(":spring-boot-project:spring-boot-hazelcast"))
3132
optional(project(":spring-boot-project:spring-boot-http"))

spring-boot-project/spring-boot-actuator-autoconfigure/src/main/java/org/springframework/boot/actuate/autoconfigure/data/redis/RedisHealthContributorAutoConfiguration.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,6 @@
2626
import org.springframework.boot.autoconfigure.condition.ConditionalOnBean;
2727
import org.springframework.boot.autoconfigure.condition.ConditionalOnClass;
2828
import org.springframework.boot.autoconfigure.condition.ConditionalOnMissingBean;
29-
import org.springframework.boot.autoconfigure.data.redis.RedisAutoConfiguration;
3029
import org.springframework.context.annotation.Bean;
3130
import org.springframework.data.redis.connection.RedisConnectionFactory;
3231

@@ -39,7 +38,8 @@
3938
* @author Mark Paluch
4039
* @since 2.1.0
4140
*/
42-
@AutoConfiguration(after = { RedisAutoConfiguration.class, RedisReactiveHealthContributorAutoConfiguration.class })
41+
@AutoConfiguration(after = RedisReactiveHealthContributorAutoConfiguration.class,
42+
afterName = "org.springframework.boot.data.redis.autoconfigure.RedisAutoConfiguration")
4343
@ConditionalOnClass(RedisConnectionFactory.class)
4444
@ConditionalOnBean(RedisConnectionFactory.class)
4545
@ConditionalOnEnabledHealthIndicator("redis")

spring-boot-project/spring-boot-actuator-autoconfigure/src/main/java/org/springframework/boot/actuate/autoconfigure/data/redis/RedisReactiveHealthContributorAutoConfiguration.java

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,6 @@
2828
import org.springframework.boot.autoconfigure.condition.ConditionalOnBean;
2929
import org.springframework.boot.autoconfigure.condition.ConditionalOnClass;
3030
import org.springframework.boot.autoconfigure.condition.ConditionalOnMissingBean;
31-
import org.springframework.boot.autoconfigure.data.redis.RedisReactiveAutoConfiguration;
3231
import org.springframework.context.annotation.Bean;
3332
import org.springframework.data.redis.connection.ReactiveRedisConnectionFactory;
3433

@@ -42,7 +41,7 @@
4241
* @author Mark Paluch
4342
* @since 2.1.0
4443
*/
45-
@AutoConfiguration(after = RedisReactiveAutoConfiguration.class)
44+
@AutoConfiguration(afterName = "org.springframework.boot.data.redis.autoconfigure.RedisReactiveAutoConfiguration")
4645
@ConditionalOnClass({ ReactiveRedisConnectionFactory.class, Flux.class })
4746
@ConditionalOnBean(ReactiveRedisConnectionFactory.class)
4847
@ConditionalOnEnabledHealthIndicator("redis")

spring-boot-project/spring-boot-actuator-autoconfigure/src/main/java/org/springframework/boot/actuate/autoconfigure/metrics/redis/LettuceMetricsAutoConfiguration.java

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*
2-
* Copyright 2012-2022 the original author or authors.
2+
* Copyright 2012-2025 the original author or authors.
33
*
44
* Licensed under the Apache License, Version 2.0 (the "License");
55
* you may not use this file except in compliance with the License.
@@ -27,8 +27,7 @@
2727
import org.springframework.boot.autoconfigure.condition.ConditionalOnBean;
2828
import org.springframework.boot.autoconfigure.condition.ConditionalOnClass;
2929
import org.springframework.boot.autoconfigure.condition.ConditionalOnMissingBean;
30-
import org.springframework.boot.autoconfigure.data.redis.ClientResourcesBuilderCustomizer;
31-
import org.springframework.boot.autoconfigure.data.redis.RedisAutoConfiguration;
30+
import org.springframework.boot.data.redis.autoconfigure.ClientResourcesBuilderCustomizer;
3231
import org.springframework.context.annotation.Bean;
3332

3433
/**
@@ -38,9 +37,10 @@
3837
* @author Yanming Zhou
3938
* @since 2.6.0
4039
*/
41-
@AutoConfiguration(before = RedisAutoConfiguration.class,
40+
@AutoConfiguration(beforeName = "org.springframework.boot.data.redis.autoconfigure.RedisAutoConfiguration",
4241
after = { MetricsAutoConfiguration.class, CompositeMeterRegistryAutoConfiguration.class })
43-
@ConditionalOnClass({ RedisClient.class, MicrometerCommandLatencyRecorder.class })
42+
@ConditionalOnClass({ ClientResourcesBuilderCustomizer.class, RedisClient.class,
43+
MicrometerCommandLatencyRecorder.class })
4444
@ConditionalOnBean(MeterRegistry.class)
4545
public class LettuceMetricsAutoConfiguration {
4646

spring-boot-project/spring-boot-actuator-autoconfigure/src/test/java/org/springframework/boot/actuate/autoconfigure/data/redis/RedisHealthContributorAutoConfigurationTests.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*
2-
* Copyright 2012-2023 the original author or authors.
2+
* Copyright 2012-2025 the original author or authors.
33
*
44
* Licensed under the Apache License, Version 2.0 (the "License");
55
* you may not use this file except in compliance with the License.
@@ -22,7 +22,7 @@
2222
import org.springframework.boot.actuate.data.redis.RedisHealthIndicator;
2323
import org.springframework.boot.actuate.data.redis.RedisReactiveHealthIndicator;
2424
import org.springframework.boot.autoconfigure.AutoConfigurations;
25-
import org.springframework.boot.autoconfigure.data.redis.RedisAutoConfiguration;
25+
import org.springframework.boot.data.redis.autoconfigure.RedisAutoConfiguration;
2626
import org.springframework.boot.test.context.runner.ApplicationContextRunner;
2727
import org.springframework.boot.testsupport.classpath.ClassPathExclusions;
2828

spring-boot-project/spring-boot-actuator-autoconfigure/src/test/java/org/springframework/boot/actuate/autoconfigure/data/redis/RedisReactiveHealthContributorAutoConfigurationTests.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*
2-
* Copyright 2012-2023 the original author or authors.
2+
* Copyright 2012-2025 the original author or authors.
33
*
44
* Licensed under the Apache License, Version 2.0 (the "License");
55
* you may not use this file except in compliance with the License.
@@ -22,7 +22,7 @@
2222
import org.springframework.boot.actuate.data.redis.RedisHealthIndicator;
2323
import org.springframework.boot.actuate.data.redis.RedisReactiveHealthIndicator;
2424
import org.springframework.boot.autoconfigure.AutoConfigurations;
25-
import org.springframework.boot.autoconfigure.data.redis.RedisAutoConfiguration;
25+
import org.springframework.boot.data.redis.autoconfigure.RedisAutoConfiguration;
2626
import org.springframework.boot.test.context.runner.ApplicationContextRunner;
2727

2828
import static org.assertj.core.api.Assertions.assertThat;

spring-boot-project/spring-boot-actuator-autoconfigure/src/test/java/org/springframework/boot/actuate/autoconfigure/integrationtest/WebEndpointsAutoConfigurationIntegrationTests.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -24,8 +24,6 @@
2424
import org.springframework.boot.actuate.health.HealthEndpointWebExtension;
2525
import org.springframework.boot.actuate.health.ReactiveHealthEndpointWebExtension;
2626
import org.springframework.boot.autoconfigure.EnableAutoConfiguration;
27-
import org.springframework.boot.autoconfigure.data.redis.RedisAutoConfiguration;
28-
import org.springframework.boot.autoconfigure.data.redis.RedisRepositoriesAutoConfiguration;
2927
import org.springframework.boot.autoconfigure.data.rest.RepositoryRestMvcAutoConfiguration;
3028
import org.springframework.boot.cassandra.autoconfigure.CassandraAutoConfiguration;
3129
import org.springframework.boot.context.annotation.UserConfigurations;
@@ -35,6 +33,8 @@
3533
import org.springframework.boot.data.mongodb.autoconfigure.MongoReactiveDataAutoConfiguration;
3634
import org.springframework.boot.data.neo4j.autoconfigure.Neo4jDataAutoConfiguration;
3735
import org.springframework.boot.data.neo4j.autoconfigure.Neo4jReactiveDataAutoConfiguration;
36+
import org.springframework.boot.data.redis.autoconfigure.RedisAutoConfiguration;
37+
import org.springframework.boot.data.redis.autoconfigure.RedisRepositoriesAutoConfiguration;
3838
import org.springframework.boot.flyway.autoconfigure.FlywayAutoConfiguration;
3939
import org.springframework.boot.hazelcast.autoconfigure.HazelcastAutoConfiguration;
4040
import org.springframework.boot.liquibase.autoconfigure.LiquibaseAutoConfiguration;

spring-boot-project/spring-boot-actuator-autoconfigure/src/test/java/org/springframework/boot/actuate/autoconfigure/metrics/redis/LettuceMetricsAutoConfigurationTests.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*
2-
* Copyright 2012-2023 the original author or authors.
2+
* Copyright 2012-2025 the original author or authors.
33
*
44
* Licensed under the Apache License, Version 2.0 (the "License");
55
* you may not use this file except in compliance with the License.
@@ -23,7 +23,7 @@
2323

2424
import org.springframework.boot.actuate.autoconfigure.metrics.test.MetricsRun;
2525
import org.springframework.boot.autoconfigure.AutoConfigurations;
26-
import org.springframework.boot.autoconfigure.data.redis.RedisAutoConfiguration;
26+
import org.springframework.boot.data.redis.autoconfigure.RedisAutoConfiguration;
2727
import org.springframework.boot.test.context.runner.ApplicationContextRunner;
2828
import org.springframework.context.annotation.Bean;
2929
import org.springframework.context.annotation.Configuration;

spring-boot-project/spring-boot-actuator/build.gradle

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -26,6 +26,7 @@ dependencies {
2626

2727
optional(project(":spring-boot-project:spring-boot-activemq"))
2828
optional(project(":spring-boot-project:spring-boot-data-cassandra"))
29+
optional(project(":spring-boot-project:spring-boot-data-redis"))
2930
optional(project(":spring-boot-project:spring-boot-flyway"))
3031
optional(project(":spring-boot-project:spring-boot-http"))
3132
optional(project(":spring-boot-project:spring-boot-integration"))

0 commit comments

Comments
 (0)