use of com.alicp.jetcache.anno.support.ConfigMap in project jetcache by alibaba.
the class SpringCacheContext method init.
public void init() {
if (applicationContext != null) {
ConfigMap configMap = applicationContext.getBean(ConfigMap.class);
cacheManager.setCacheCreator((area, cacheName) -> {
CacheInvokeConfig cic = configMap.getByCacheName(area, cacheName);
if (cic == null) {
throw new IllegalArgumentException("cache definition not found: area=" + area + ",cacheName=" + cacheName);
}
return __createOrGetCache(cic.getCachedAnnoConfig(), area, cacheName);
});
}
}
Aggregations