New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
ERR Unsupported CONFIG parameter: notify-keyspace-events #113
Comments
Thank you for your feedback.
The reasoning is that the keyspace notifications are used to ensure that the SessionDestroyedEvent is fired. This is especially important if you are using Spring Session with WebSocket support. If you are not using Spring Session with WebSocket support, then you can use a configuration similar to the following: @Configuration
@EnableScheduling
public class RedisHttpSessionConfiguration {
// set to some value i.e. @Value("${spring.session.inactive}")
private Integer maxInactiveIntervalInSeconds;
@Bean
public RedisTemplate<String,ExpiringSession> sessionRedisTemplate(RedisConnectionFactory connectionFactory) {
RedisTemplate<String, ExpiringSession> template = new RedisTemplate<String, ExpiringSession>();
template.setKeySerializer(new StringRedisSerializer());
template.setHashKeySerializer(new StringRedisSerializer());
template.setConnectionFactory(connectionFactory);
return template;
}
@Bean
public RedisOperationsSessionRepository sessionRepository(RedisTemplate<String, ExpiringSession> sessionRedisTemplate) {
RedisOperationsSessionRepository sessionRepository = new RedisOperationsSessionRepository(sessionRedisTemplate);
sessionRepository.setDefaultMaxInactiveInterval(maxInactiveIntervalInSeconds);
return sessionRepository;
}
@Bean
public <S extends ExpiringSession> SessionRepositoryFilter<? extends ExpiringSession> springSessionRepositoryFilter(SessionRepository<S> sessionRepository) {
SessionRepositoryFilter<S> sessionRepositoryFilter = new SessionRepositoryFilter<S>(sessionRepository);
return sessionRepositoryFilter;
}
} |
@rwinch Please re-open. The problem is that I have create a GitHub issue for that project: kstyrc/embedded-redis#23 |
Thanks for looking into this @ghillert I have reopened the issue |
Upgrade to embedded-redis:0.4 (fixes #113)
Thanks to a PR from @domdorn this should now be resolved in master! |
Sorry, but after I added 1.0.1-BUILD_SNAPSHOT dependency, I also got that error, so that fix does not resolve the bug. |
@szabobar I guess you're using Windows (as myself). The embedded-redis:0.4 contains Redis 2.8 for Linux and Mac, but only version 2.6 for Windows. You have to patch the embedded-redis artifact or define an external path to your lokal Redis 2.8 executable. |
@t4gedieb Thanks for the response. Can you respond to @kstyrc on kstyrc/embedded-redis#23 so that we can get the Windows version updated too? |
add following bean in HttpSessionConfig @bean |
I try to run the samples, but I always get the exception below. How do I fix the problem? Do I need to change some versions?
The text was updated successfully, but these errors were encountered: