From f0125afb5eb4286ff59ecf84f429cce459434248 Mon Sep 17 00:00:00 2001 From: izeye Date: Wed, 29 Dec 2021 05:12:57 +0900 Subject: [PATCH 1/2] Remove references to JCacheConfigurerSupport and CachingConfigurerSupport See gh-27863 --- .../aspectj/AspectJEnableCachingIsolatedTests.java | 10 +++++----- .../cache/aspectj/AspectJEnableCachingTests.java | 4 ++-- .../cache/jcache/config/JCacheConfigurer.java | 2 +- .../cache/annotation/CachingConfigurer.java | 8 ++++---- .../cache/annotation/EnableCaching.java | 2 +- 5 files changed, 13 insertions(+), 13 deletions(-) diff --git a/spring-aspects/src/test/java/org/springframework/cache/aspectj/AspectJEnableCachingIsolatedTests.java b/spring-aspects/src/test/java/org/springframework/cache/aspectj/AspectJEnableCachingIsolatedTests.java index 4235f801df7..6c16c26364a 100644 --- a/spring-aspects/src/test/java/org/springframework/cache/aspectj/AspectJEnableCachingIsolatedTests.java +++ b/spring-aspects/src/test/java/org/springframework/cache/aspectj/AspectJEnableCachingIsolatedTests.java @@ -21,7 +21,7 @@ import org.junit.jupiter.api.Disabled; import org.junit.jupiter.api.Test; import org.springframework.cache.CacheManager; -import org.springframework.cache.annotation.CachingConfigurerSupport; +import org.springframework.cache.annotation.CachingConfigurer; import org.springframework.cache.annotation.EnableCaching; import org.springframework.cache.interceptor.CacheErrorHandler; import org.springframework.cache.interceptor.CacheResolver; @@ -143,7 +143,7 @@ public class AspectJEnableCachingIsolatedTests { @Configuration @EnableCaching(mode = AdviceMode.ASPECTJ) - static class EnableCachingConfig extends CachingConfigurerSupport { + static class EnableCachingConfig implements CachingConfigurer { @Override @Bean @@ -220,7 +220,7 @@ public class AspectJEnableCachingIsolatedTests { @Configuration @EnableCaching(mode = AdviceMode.ASPECTJ) - static class MultiCacheManagerConfigurer extends CachingConfigurerSupport { + static class MultiCacheManagerConfigurer implements CachingConfigurer { @Bean public CacheManager cm1() { @@ -246,7 +246,7 @@ public class AspectJEnableCachingIsolatedTests { @Configuration @EnableCaching(mode = AdviceMode.ASPECTJ) - static class EmptyConfigSupportConfig extends CachingConfigurerSupport { + static class EmptyConfigSupportConfig implements CachingConfigurer { @Bean public CacheManager cm() { @@ -258,7 +258,7 @@ public class AspectJEnableCachingIsolatedTests { @Configuration @EnableCaching(mode = AdviceMode.ASPECTJ) - static class FullCachingConfig extends CachingConfigurerSupport { + static class FullCachingConfig implements CachingConfigurer { @Override @Bean diff --git a/spring-aspects/src/test/java/org/springframework/cache/aspectj/AspectJEnableCachingTests.java b/spring-aspects/src/test/java/org/springframework/cache/aspectj/AspectJEnableCachingTests.java index 7e693d6ea13..4c5f7b414ab 100644 --- a/spring-aspects/src/test/java/org/springframework/cache/aspectj/AspectJEnableCachingTests.java +++ b/spring-aspects/src/test/java/org/springframework/cache/aspectj/AspectJEnableCachingTests.java @@ -17,7 +17,7 @@ package org.springframework.cache.aspectj; import org.springframework.cache.CacheManager; -import org.springframework.cache.annotation.CachingConfigurerSupport; +import org.springframework.cache.annotation.CachingConfigurer; import org.springframework.cache.annotation.EnableCaching; import org.springframework.cache.config.AnnotatedClassCacheableService; import org.springframework.cache.config.CacheableService; @@ -47,7 +47,7 @@ public class AspectJEnableCachingTests extends AbstractCacheAnnotationTests { @Configuration @EnableCaching(mode = AdviceMode.ASPECTJ) - static class EnableCachingConfig extends CachingConfigurerSupport { + static class EnableCachingConfig implements CachingConfigurer { @Override @Bean diff --git a/spring-context-support/src/main/java/org/springframework/cache/jcache/config/JCacheConfigurer.java b/spring-context-support/src/main/java/org/springframework/cache/jcache/config/JCacheConfigurer.java index 039729a02d5..12f3d4fb786 100644 --- a/spring-context-support/src/main/java/org/springframework/cache/jcache/config/JCacheConfigurer.java +++ b/spring-context-support/src/main/java/org/springframework/cache/jcache/config/JCacheConfigurer.java @@ -46,7 +46,7 @@ public interface JCacheConfigurer extends CachingConfigurer { *
 	 * @Configuration
 	 * @EnableCaching
-	 * public class AppConfig extends JCacheConfigurerSupport {
+	 * public class AppConfig implements JCacheConfigurer {
 	 *     @Bean // important!
 	 *     @Override
 	 *     public CacheResolver exceptionCacheResolver() {
diff --git a/spring-context/src/main/java/org/springframework/cache/annotation/CachingConfigurer.java b/spring-context/src/main/java/org/springframework/cache/annotation/CachingConfigurer.java
index e3dbe023f18..a0a7c8a83d3 100644
--- a/spring-context/src/main/java/org/springframework/cache/annotation/CachingConfigurer.java
+++ b/spring-context/src/main/java/org/springframework/cache/annotation/CachingConfigurer.java
@@ -50,7 +50,7 @@ public interface CachingConfigurer {
 	 * 
 	 * @Configuration
 	 * @EnableCaching
-	 * public class AppConfig extends CachingConfigurerSupport {
+	 * public class AppConfig implements CachingConfigurer {
 	 *     @Bean // important!
 	 *     @Override
 	 *     public CacheManager cacheManager() {
@@ -77,7 +77,7 @@ public interface CachingConfigurer {
 	 * 
 	 * @Configuration
 	 * @EnableCaching
-	 * public class AppConfig extends CachingConfigurerSupport {
+	 * public class AppConfig implements CachingConfigurer {
 	 *     @Bean // important!
 	 *     @Override
 	 *     public CacheResolver cacheResolver() {
@@ -100,7 +100,7 @@ public interface CachingConfigurer {
 	 * 
 	 * @Configuration
 	 * @EnableCaching
-	 * public class AppConfig extends CachingConfigurerSupport {
+	 * public class AppConfig implements CachingConfigurer {
 	 *     @Bean // important!
 	 *     @Override
 	 *     public KeyGenerator keyGenerator() {
@@ -125,7 +125,7 @@ public interface CachingConfigurer {
 	 * 
 	 * @Configuration
 	 * @EnableCaching
-	 * public class AppConfig extends CachingConfigurerSupport {
+	 * public class AppConfig implements CachingConfigurer {
 	 *     @Bean // important!
 	 *     @Override
 	 *     public CacheErrorHandler errorHandler() {
diff --git a/spring-context/src/main/java/org/springframework/cache/annotation/EnableCaching.java b/spring-context/src/main/java/org/springframework/cache/annotation/EnableCaching.java
index 85948024cb3..70f62b5fd0d 100644
--- a/spring-context/src/main/java/org/springframework/cache/annotation/EnableCaching.java
+++ b/spring-context/src/main/java/org/springframework/cache/annotation/EnableCaching.java
@@ -103,7 +103,7 @@ import org.springframework.core.Ordered;
  * 
  * @Configuration
  * @EnableCaching
- * public class AppConfig extends CachingConfigurerSupport {
+ * public class AppConfig implements CachingConfigurer {
  *
  *     @Bean
  *     public MyService myService() {

From c204cc7ba0a2a62994b7275ad0743624c1344597 Mon Sep 17 00:00:00 2001
From: Stephane Nicoll 
Date: Wed, 29 Dec 2021 10:54:49 +0100
Subject: [PATCH 2/2] Update copyright year of changed file

See gh-27863
---
 .../org/springframework/cache/annotation/EnableCaching.java     | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/spring-context/src/main/java/org/springframework/cache/annotation/EnableCaching.java b/spring-context/src/main/java/org/springframework/cache/annotation/EnableCaching.java
index 70f62b5fd0d..872f493edc0 100644
--- a/spring-context/src/main/java/org/springframework/cache/annotation/EnableCaching.java
+++ b/spring-context/src/main/java/org/springframework/cache/annotation/EnableCaching.java
@@ -1,5 +1,5 @@
 /*
- * Copyright 2002-2018 the original author or authors.
+ * Copyright 2002-2021 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.