HttpSessionConfig.java 615 B

1234567891011121314151617181920
  1. package com.aijia.kmt.common;
  2. import org.springframework.context.annotation.Bean;
  3. import org.springframework.context.annotation.Configuration;
  4. import org.springframework.session.data.redis.config.ConfigureRedisAction;
  5. @Configuration
  6. public class HttpSessionConfig {
  7. /**
  8. * 解决redis集群环境没有开启Keyspace notifications导致的
  9. *
  10. * Error creating bean with name 'enableRedisKeyspaceNotificationsInitializer' defined in class path resource
  11. *
  12. * */
  13. @Bean
  14. public static ConfigureRedisAction configureRedisAction() {
  15. return ConfigureRedisAction.NO_OP;
  16. }
  17. }