Add default methods to CachingConfigurer
This commit adds default methods to CachingConfigurer and JCacheConfigurer and removes the reference to their respective support classes as they are now irrelevant. Closes gh-27811
This commit is contained in:
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright 2002-2020 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.
|
||||
@@ -28,7 +28,7 @@ import org.springframework.beans.testfixture.beans.TestBean;
|
||||
import org.springframework.cache.annotation.CachePut;
|
||||
import org.springframework.cache.annotation.Cacheable;
|
||||
import org.springframework.cache.annotation.Caching;
|
||||
import org.springframework.cache.annotation.CachingConfigurerSupport;
|
||||
import org.springframework.cache.annotation.CachingConfigurer;
|
||||
import org.springframework.cache.annotation.EnableCaching;
|
||||
import org.springframework.cache.concurrent.ConcurrentMapCache;
|
||||
import org.springframework.cache.concurrent.ConcurrentMapCacheManager;
|
||||
@@ -306,7 +306,7 @@ public class CacheReproTests {
|
||||
|
||||
@Configuration
|
||||
@EnableCaching
|
||||
public static class Spr13081Config extends CachingConfigurerSupport {
|
||||
public static class Spr13081Config implements CachingConfigurer {
|
||||
|
||||
@Bean
|
||||
@Override
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright 2002-2019 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.
|
||||
@@ -26,7 +26,7 @@ import org.springframework.cache.Cache;
|
||||
import org.springframework.cache.CacheManager;
|
||||
import org.springframework.cache.annotation.CacheConfig;
|
||||
import org.springframework.cache.annotation.Cacheable;
|
||||
import org.springframework.cache.annotation.CachingConfigurerSupport;
|
||||
import org.springframework.cache.annotation.CachingConfigurer;
|
||||
import org.springframework.cache.annotation.EnableCaching;
|
||||
import org.springframework.context.ConfigurableApplicationContext;
|
||||
import org.springframework.context.annotation.AnnotationConfigApplicationContext;
|
||||
@@ -124,7 +124,7 @@ public class EnableCachingIntegrationTests {
|
||||
|
||||
|
||||
@Configuration
|
||||
static class SharedConfig extends CachingConfigurerSupport {
|
||||
static class SharedConfig implements CachingConfigurer {
|
||||
|
||||
@Override
|
||||
@Bean
|
||||
|
||||
@@ -22,7 +22,7 @@ import org.springframework.beans.factory.BeanCreationException;
|
||||
import org.springframework.beans.factory.NoSuchBeanDefinitionException;
|
||||
import org.springframework.beans.factory.NoUniqueBeanDefinitionException;
|
||||
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.CacheInterceptor;
|
||||
@@ -150,7 +150,7 @@ public class EnableCachingTests extends AbstractCacheAnnotationTests {
|
||||
|
||||
@Configuration
|
||||
@EnableCaching
|
||||
static class EnableCachingConfig extends CachingConfigurerSupport {
|
||||
static class EnableCachingConfig implements CachingConfigurer {
|
||||
|
||||
@Override
|
||||
@Bean
|
||||
@@ -227,7 +227,7 @@ public class EnableCachingTests extends AbstractCacheAnnotationTests {
|
||||
|
||||
@Configuration
|
||||
@EnableCaching
|
||||
static class MultiCacheManagerConfigurer extends CachingConfigurerSupport {
|
||||
static class MultiCacheManagerConfigurer implements CachingConfigurer {
|
||||
|
||||
@Bean
|
||||
public CacheManager cm1() {
|
||||
@@ -253,7 +253,7 @@ public class EnableCachingTests extends AbstractCacheAnnotationTests {
|
||||
|
||||
@Configuration
|
||||
@EnableCaching
|
||||
static class EmptyConfigSupportConfig extends CachingConfigurerSupport {
|
||||
static class EmptyConfigSupportConfig implements CachingConfigurer {
|
||||
|
||||
@Bean
|
||||
public CacheManager cm() {
|
||||
@@ -264,7 +264,7 @@ public class EnableCachingTests extends AbstractCacheAnnotationTests {
|
||||
|
||||
@Configuration
|
||||
@EnableCaching
|
||||
static class FullCachingConfig extends CachingConfigurerSupport {
|
||||
static class FullCachingConfig implements CachingConfigurer {
|
||||
|
||||
@Override
|
||||
@Bean
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright 2002-2016 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.
|
||||
@@ -20,7 +20,7 @@ import org.junit.jupiter.api.Test;
|
||||
|
||||
import org.springframework.cache.CacheManager;
|
||||
import org.springframework.cache.annotation.CachePut;
|
||||
import org.springframework.cache.annotation.CachingConfigurerSupport;
|
||||
import org.springframework.cache.annotation.CachingConfigurer;
|
||||
import org.springframework.cache.annotation.EnableCaching;
|
||||
import org.springframework.cache.concurrent.ConcurrentMapCacheManager;
|
||||
import org.springframework.context.ConfigurableApplicationContext;
|
||||
@@ -122,7 +122,7 @@ public class ExpressionCachingIntegrationTests {
|
||||
|
||||
@Configuration
|
||||
@EnableCaching
|
||||
static class SharedConfig extends CachingConfigurerSupport {
|
||||
static class SharedConfig implements CachingConfigurer {
|
||||
|
||||
@Override
|
||||
@Bean
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright 2002-2019 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.
|
||||
@@ -28,7 +28,7 @@ import org.springframework.cache.annotation.CacheConfig;
|
||||
import org.springframework.cache.annotation.CacheEvict;
|
||||
import org.springframework.cache.annotation.CachePut;
|
||||
import org.springframework.cache.annotation.Cacheable;
|
||||
import org.springframework.cache.annotation.CachingConfigurerSupport;
|
||||
import org.springframework.cache.annotation.CachingConfigurer;
|
||||
import org.springframework.cache.annotation.EnableCaching;
|
||||
import org.springframework.cache.support.SimpleCacheManager;
|
||||
import org.springframework.cache.support.SimpleValueWrapper;
|
||||
@@ -170,7 +170,7 @@ public class CacheErrorHandlerTests {
|
||||
|
||||
@Configuration
|
||||
@EnableCaching
|
||||
static class Config extends CachingConfigurerSupport {
|
||||
static class Config implements CachingConfigurer {
|
||||
|
||||
@Bean
|
||||
@Override
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright 2002-2019 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.
|
||||
@@ -27,7 +27,7 @@ import org.springframework.cache.CacheManager;
|
||||
import org.springframework.cache.annotation.CacheConfig;
|
||||
import org.springframework.cache.annotation.CachePut;
|
||||
import org.springframework.cache.annotation.Cacheable;
|
||||
import org.springframework.cache.annotation.CachingConfigurerSupport;
|
||||
import org.springframework.cache.annotation.CachingConfigurer;
|
||||
import org.springframework.cache.annotation.EnableCaching;
|
||||
import org.springframework.cache.concurrent.ConcurrentMapCacheManager;
|
||||
import org.springframework.context.ConfigurableApplicationContext;
|
||||
@@ -106,7 +106,7 @@ public class CachePutEvaluationTests {
|
||||
|
||||
@Configuration
|
||||
@EnableCaching
|
||||
static class Config extends CachingConfigurerSupport {
|
||||
static class Config implements CachingConfigurer {
|
||||
|
||||
@Bean
|
||||
@Override
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright 2002-2019 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.
|
||||
@@ -29,7 +29,7 @@ import org.springframework.cache.Cache;
|
||||
import org.springframework.cache.CacheManager;
|
||||
import org.springframework.cache.annotation.CacheConfig;
|
||||
import org.springframework.cache.annotation.Cacheable;
|
||||
import org.springframework.cache.annotation.CachingConfigurerSupport;
|
||||
import org.springframework.cache.annotation.CachingConfigurer;
|
||||
import org.springframework.cache.annotation.EnableCaching;
|
||||
import org.springframework.context.ApplicationContext;
|
||||
import org.springframework.context.annotation.AnnotationConfigApplicationContext;
|
||||
@@ -149,7 +149,7 @@ public class CacheResolverCustomizationTests {
|
||||
|
||||
@Configuration
|
||||
@EnableCaching
|
||||
static class Config extends CachingConfigurerSupport {
|
||||
static class Config implements CachingConfigurer {
|
||||
|
||||
@Override
|
||||
@Bean
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright 2002-2019 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.
|
||||
@@ -26,7 +26,7 @@ import org.springframework.cache.CacheManager;
|
||||
import org.springframework.cache.annotation.CacheEvict;
|
||||
import org.springframework.cache.annotation.Cacheable;
|
||||
import org.springframework.cache.annotation.Caching;
|
||||
import org.springframework.cache.annotation.CachingConfigurerSupport;
|
||||
import org.springframework.cache.annotation.CachingConfigurer;
|
||||
import org.springframework.cache.annotation.EnableCaching;
|
||||
import org.springframework.context.ConfigurableApplicationContext;
|
||||
import org.springframework.context.annotation.AnnotationConfigApplicationContext;
|
||||
@@ -133,7 +133,7 @@ public class CacheSyncFailureTests {
|
||||
|
||||
@Configuration
|
||||
@EnableCaching
|
||||
static class Config extends CachingConfigurerSupport {
|
||||
static class Config implements CachingConfigurer {
|
||||
|
||||
@Override
|
||||
@Bean
|
||||
|
||||
Reference in New Issue
Block a user