Class CachingConfigurationSelector
java.lang.Object
org.springframework.context.annotation.AdviceModeImportSelector<EnableCaching>
org.springframework.cache.annotation.CachingConfigurationSelector
- All Implemented Interfaces:
ImportSelector
Selects which implementation of
AbstractCachingConfiguration
should
be used based on the value of EnableCaching.mode()
on the importing
@Configuration
class.
Detects the presence of JSR-107 and enables JCache support accordingly.
- Since:
- 3.1
- Author:
- Chris Beams, Stephane Nicoll
- See Also:
-
Field Summary
Fields inherited from class org.springframework.context.annotation.AdviceModeImportSelector
DEFAULT_ADVICE_MODE_ATTRIBUTE_NAME
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionString[]
selectImports
(AdviceMode adviceMode) ReturnsProxyCachingConfiguration
orAspectJCachingConfiguration
forPROXY
andASPECTJ
values ofEnableCaching.mode()
, respectively.Methods inherited from class org.springframework.context.annotation.AdviceModeImportSelector
getAdviceModeAttributeName, selectImports
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
Methods inherited from interface org.springframework.context.annotation.ImportSelector
getExclusionFilter
-
Constructor Details
-
CachingConfigurationSelector
public CachingConfigurationSelector()
-
-
Method Details
-
selectImports
ReturnsProxyCachingConfiguration
orAspectJCachingConfiguration
forPROXY
andASPECTJ
values ofEnableCaching.mode()
, respectively. Potentially includes corresponding JCache configuration as well.- Specified by:
selectImports
in classAdviceModeImportSelector<EnableCaching>
- Parameters:
adviceMode
- the value of the advice mode attribute for the annotation specified via generics.- Returns:
- array containing classes to import (empty array if none;
null
if the givenAdviceMode
is unknown)
-