I've enabled caching in a SpringBoot application with the @EnableCaching and @Cacheable annotations. The cache properties are defined in the application.yaml file.
spring
cache
type=simple
Now I want to know if there is a way to access explicitly the cacheManager bean defined by Spring Boot(created to support the @EnableCaching annotation) without defining a new CacheManager Bean in the configuration files.
I'm basically trying to autowire the cacheManager bean defined by Spring Boot so that I can make explicit calls to it.
@Autowired
private CacheManager cacheManager;
...
Cache cache = cacheManage.getCache("toto")
Regards
Notes: My IDE is telling me that It can't autowire the cacheManager bean