Cannot find cache named '' for CacheableOperation[] caches
@SpringBootApplication(exclude = {
ContextStackAutoConfiguration.class,
ElastiCacheAutoConfiguration.class
})
Just being nit-picky use @SpringBootApplication instead of @EnableAutoConfiguration
If you use spring cloud aws, disable automatic elasticache configuration.
@EnableAutoConfiguration(exclude = ElastiCacheAutoConfiguration.class)
@EnableCaching
@SpringBootApplication
public class Application {
public static void main(String[] args) {
SpringApplication.run(Application.class, args);
}
}
Try this :
@Bean
public CacheManager cacheManager() {
SimpleCacheManager cacheManager = new SimpleCacheManager();
List<Cache> caches = new ArrayList<Cache>();
caches.add(new ConcurrentMapCache("getActionsBycasId"));
cacheManager.setCaches(caches);
return cacheManager;
}