mirror of
https://github.com/spring-projects/spring-framework
synced 2026-06-08 17:33:33 +00:00
Introduce value alias for cacheNames in @CacheConfig
Prior to this commit @CacheConfig did not have a `value` attribute alias for `cacheNames`, even though the rest of the cache-related annotations (such as @Cacheable, @CachePut, etc.) do have a `value` / `cacheNames` alias pair. To address that inconsistency, this commit introduces a `value` alias for `cacheNames` in @CacheConfig as well. See gh-35096 Closes gh-35152
This commit is contained in:
+1
-1
@@ -443,7 +443,7 @@ class AnnotationCacheOperationSourceTests {
|
||||
}
|
||||
|
||||
|
||||
@CacheConfig(cacheNames = "myCache")
|
||||
@CacheConfig("myCache")
|
||||
private interface CacheConfigIfc {
|
||||
|
||||
@Cacheable
|
||||
|
||||
Vendored
+3
-3
@@ -256,7 +256,7 @@ class ReactiveCachingTests {
|
||||
}
|
||||
|
||||
|
||||
@CacheConfig(cacheNames = "first")
|
||||
@CacheConfig("first")
|
||||
static class ReactiveCacheableService {
|
||||
|
||||
private final AtomicLong counter = new AtomicLong();
|
||||
@@ -282,7 +282,7 @@ class ReactiveCachingTests {
|
||||
}
|
||||
|
||||
|
||||
@CacheConfig(cacheNames = "first")
|
||||
@CacheConfig("first")
|
||||
static class ReactiveSyncCacheableService {
|
||||
|
||||
private final AtomicLong counter = new AtomicLong();
|
||||
@@ -304,7 +304,7 @@ class ReactiveCachingTests {
|
||||
}
|
||||
|
||||
|
||||
@CacheConfig(cacheNames = "first")
|
||||
@CacheConfig("first")
|
||||
static class ReactiveFailureCacheableService {
|
||||
|
||||
private final AtomicBoolean cacheFutureInvoked = new AtomicBoolean();
|
||||
|
||||
Vendored
+1
-1
@@ -200,7 +200,7 @@ class EnableCachingIntegrationTests {
|
||||
}
|
||||
|
||||
|
||||
@CacheConfig(cacheNames = "testCache")
|
||||
@CacheConfig("testCache")
|
||||
static class FooServiceImpl implements FooService {
|
||||
|
||||
private final AtomicLong counter = new AtomicLong();
|
||||
|
||||
Vendored
+1
-1
@@ -261,7 +261,7 @@ class CacheErrorHandlerTests {
|
||||
|
||||
}
|
||||
|
||||
@CacheConfig(cacheNames = "test")
|
||||
@CacheConfig("test")
|
||||
public static class SimpleService {
|
||||
private AtomicLong counter = new AtomicLong();
|
||||
|
||||
|
||||
Vendored
+1
-1
@@ -121,7 +121,7 @@ class CachePutEvaluationTests {
|
||||
|
||||
}
|
||||
|
||||
@CacheConfig(cacheNames = "test")
|
||||
@CacheConfig("test")
|
||||
public static class SimpleService {
|
||||
private AtomicLong counter = new AtomicLong();
|
||||
|
||||
|
||||
+1
-1
@@ -206,7 +206,7 @@ class CacheResolverCustomizationTests {
|
||||
}
|
||||
|
||||
|
||||
@CacheConfig(cacheNames = "default")
|
||||
@CacheConfig("default")
|
||||
static class SimpleService {
|
||||
|
||||
private final AtomicLong counter = new AtomicLong();
|
||||
|
||||
Reference in New Issue
Block a user