A component required a bean named 'cacheManager' that could not be found.

Posted qingmuchuanqi48

tags:

篇首语:本文由小常识网(cha138.com)小编为大家整理,主要介绍了A component required a bean named 'cacheManager' that could not be found.相关的知识,希望对你有一定的参考价值。

***************************
APPLICATION FAILED TO START
***************************

Description:

A component required a bean named ‘cacheManager‘ that could not be found.


Action:

Consider defining a bean named ‘cacheManager‘ in your configuration.

在使用springboot集成hazelcast时候,启动时候报错。

需要在启动类中加入一个bean

    @Bean
    public CacheManager cacheManager() {
        return new HazelcastCacheManager();
    }

这样启动后,可以进行正常启动

 

以上是关于A component required a bean named 'cacheManager' that could not be found.的主要内容,如果未能解决你的问题,请参考以下文章

解决SpringBoot启动失败:A component required a bean of type ‘xxxxxxx‘ that could not be found.

A component required a bean of type ‘org.springframework.web.client.RestTemplate‘ that could not be

A component required a bean of type ‘com.xxx.xxx.service.xxxService‘ that could not be found的debug报错

A component required a bean of type ‘com.xxx.xxx.service.xxxService‘ that could not be found的debug报错

RawText "123" must be wrapped in an explicit <Text> component

Super expression must either be null or a function, not undefined