Merge branch '5.3.x'

This commit is contained in:
Stephane Nicoll
2021-12-14 14:05:18 +01:00
17 changed files with 75 additions and 71 deletions

View File

@@ -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.
@@ -26,8 +26,7 @@ import org.springframework.lang.Nullable;
* Interface to be implemented by @{@link org.springframework.context.annotation.Configuration
* Configuration} classes annotated with @{@link EnableCaching} that wish or need to
* specify explicitly how caches are resolved and how keys are generated for annotation-driven
* cache management. Consider extending {@link CachingConfigurerSupport}, which provides a
* stub implementation of all interface methods.
* cache management.
*
* <p>See @{@link EnableCaching} for general examples and context; see
* {@link #cacheManager()}, {@link #cacheResolver()} and {@link #keyGenerator()}
@@ -37,7 +36,6 @@ import org.springframework.lang.Nullable;
* @author Stephane Nicoll
* @since 3.1
* @see EnableCaching
* @see CachingConfigurerSupport
*/
public interface CachingConfigurer {
@@ -64,7 +62,9 @@ public interface CachingConfigurer {
* See @{@link EnableCaching} for more complete examples.
*/
@Nullable
CacheManager cacheManager();
default CacheManager cacheManager() {
return null;
}
/**
* Return the {@link CacheResolver} bean to use to resolve regular caches for
@@ -89,7 +89,9 @@ public interface CachingConfigurer {
* See {@link EnableCaching} for more complete examples.
*/
@Nullable
CacheResolver cacheResolver();
default CacheResolver cacheResolver() {
return null;
}
/**
* Return the key generator bean to use for annotation-driven cache management.
@@ -110,7 +112,9 @@ public interface CachingConfigurer {
* See @{@link EnableCaching} for more complete examples.
*/
@Nullable
KeyGenerator keyGenerator();
default KeyGenerator keyGenerator() {
return null;
}
/**
* Return the {@link CacheErrorHandler} to use to handle cache-related errors.
@@ -133,6 +137,8 @@ public interface CachingConfigurer {
* See @{@link EnableCaching} for more complete examples.
*/
@Nullable
CacheErrorHandler errorHandler();
default CacheErrorHandler errorHandler() {
return null;
}
}

View File

@@ -1,5 +1,5 @@
/*
* Copyright 2002-2017 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,11 +28,6 @@ import org.springframework.lang.Nullable;
* {@link AsyncUncaughtExceptionHandler} instance used to process exception thrown from
* async method with {@code void} return type.
*
* <p>Consider using {@link AsyncConfigurerSupport} providing default implementations for
* both methods if only one element needs to be customized. Furthermore, backward compatibility
* of this interface will be insured in case new customization options are introduced
* in the future.
*
* <p>See @{@link EnableAsync} for usage examples.
*
* @author Chris Beams
@@ -40,7 +35,6 @@ import org.springframework.lang.Nullable;
* @since 3.1
* @see AbstractAsyncConfiguration
* @see EnableAsync
* @see AsyncConfigurerSupport
*/
public interface AsyncConfigurer {