SpringBoot&&Spring --- Redis 集成 Error creating bean with name 'enableRedisKeyspaceNotificationsInitializer'

Spring Boot Redis 集成 Error creating bean with name 'enableRedisKeyspaceNotificationsInitializer'
一、原因:redis集群环境没有开启Keyspace notifications

二、解决办法 


@Configuration
public class HttpSessionConfig {

    /**
     *  解决redis集群环境没有开启Keyspace notifications导致的
     *
     *  Error creating bean with name 'enableRedisKeyspaceNotificationsInitializer' defined in class path resource
     *
     * */
    @Bean
    public static ConfigureRedisAction configureRedisAction() {
        return ConfigureRedisAction.NO_OP;
    }
}

posted @ 2020-03-12 20:00  xj-record  阅读(4508)  评论(0编辑  收藏  举报