Class CachingConfigurationSelector
- java.lang.Object
- org.springframework.context.annotation.AdviceModeImportSelector<EnableCaching>
- org.springframework.cache.annotation.CachingConfigurationSelector
- All Implemented Interfaces:
ImportSelector
public class CachingConfigurationSelector extends AdviceModeImportSelector<EnableCaching>
Selects which implementation ofAbstractCachingConfigurationshould be used based on the value ofEnableCaching.mode()on the importing@Configurationclass.Detects the presence of JSR-107 and enables JCache support accordingly.
- Since:
- 3.1
- Author:
- Chris Beams, Stephane Nicoll
- See Also:
EnableCaching,ProxyCachingConfiguration
Field Summary
Fields inherited from class org.springframework.context.annotation.AdviceModeImportSelector
DEFAULT_ADVICE_MODE_ATTRIBUTE_NAME
Constructor Summary
Constructors Constructor Description CachingConfigurationSelector()
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description String[]selectImports(AdviceMode adviceMode)ReturnsProxyCachingConfigurationorAspectJCachingConfigurationforPROXYandASPECTJvalues ofEnableCaching.mode(), respectively.Methods inherited from class org.springframework.context.annotation.AdviceModeImportSelector
getAdviceModeAttributeName, selectImports
Constructor Detail
CachingConfigurationSelector
public CachingConfigurationSelector()
Method Detail
selectImports
public String[] selectImports(AdviceMode adviceMode)
ReturnsProxyCachingConfigurationorAspectJCachingConfigurationforPROXYandASPECTJvalues ofEnableCaching.mode(), respectively. Potentially includes corresponding JCache configuration as well.- Specified by:
selectImportsin 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;
nullif the givenAdviceModeis unknown)