SpringBoot&&Spring --- 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;
    }
}

郝先生

继续阅读此作者的更多文章