autwire via method param

This commit is contained in:
saikat 2024-03-06 13:56:59 +05:30
parent b2a0a75389
commit e7d85015e3
1 changed files with 2 additions and 2 deletions

View File

@ -58,9 +58,9 @@ public class CacheConfig {
} }
@Bean @Bean
public CacheInterceptor cacheInterceptor(CacheManager caffeineCacheManager) { public CacheInterceptor cacheInterceptor(CacheManager caffeineCacheManager, CacheOperationSource cacheOperationSource) {
CacheInterceptor interceptor = new CustomerCacheInterceptor(caffeineCacheManager); CacheInterceptor interceptor = new CustomerCacheInterceptor(caffeineCacheManager);
interceptor.setCacheOperationSources(cacheOperationSource()); interceptor.setCacheOperationSources(cacheOperationSource);
return interceptor; return interceptor;
} }