After using spring session redis to implement shared session, httpsession monitoring fails

The reason is to configure:
<util:constant static-field="org.springframework.session.data.redis.config.ConfigureRedisAction.NO_OP"/>
   this line.

Refer to the official website article:
https://docs.spring.io/spring-session/docs/1.1.0.M1/reference/html5/#httpsession-httpsessionlistener

to see such a paragraph:
quote
If you are using @EnableRedisHttpSession the SessionMessageListener and enabling the necessary Redis Keyspace events is done automatically. However, in a secured Redis enviornment the config command is disabled. This means that Spring Session cannot configure Redis Keyspace events for you. To disable the automatic configuration add ConfigureRedisAction.NO_OP as a bean.


Solution:
remove the configuration:
<util:constant static-field="org.springframework.session.data.redis.config.ConfigureRedisAction.NO_OP"/>

If it still doesn't work, you need to enable redis key failure event monitoring.
Reference article: http://blog.csdn.net/aeroleo/article/details/77011839

Guess you like

Origin http://43.154.161.224:23101/article/api/json?id=326053466&siteId=291194637