Logout issue in tomcat session cluster

In the tomcat cluster, the tomcat-redis-session-manager framework is integrated. However, there is a problem with this framework. When the session in the application is logged out, the data in the redis server will not be deleted, resulting in the problem that the session still exists after exiting.

 

Solution:

1. Exit the interface application and set the session attribute redisremove, the value is true

2. Judge this property in the afterRequest method of the RedisSessionManager class, and call the remove method to clean up the redis data

Guess you like

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