Warning: file_get_contents(/data/phpspider/zhask/data//catemap/9/java/334.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Java Spring安全性:Spring安全性如何在SessionRegistry中注册新会话?_Java_Spring_Spring Mvc_Spring Security - Fatal编程技术网

Java Spring安全性:Spring安全性如何在SessionRegistry中注册新会话?

Java Spring安全性:Spring安全性如何在SessionRegistry中注册新会话?,java,spring,spring-mvc,spring-security,Java,Spring,Spring Mvc,Spring Security,我使用的是使用spring安全性的自定义身份验证。我没有使用任何AuthenticationProvider,但使用了UsernamePasswordAuthenticationToken和AuthenticationUser,这很好。我想获得所有登录用户的列表,可以使用SessionRegistry。我想知道SessionRegistry如何注册新会话以及如何注册?我浏览了spring文档,但没有解释它的工作原理。有人能帮忙吗?成功身份验证后,将使用注册表SessionAuthenticati

我使用的是使用spring安全性的自定义身份验证。我没有使用任何AuthenticationProvider,但使用了UsernamePasswordAuthenticationToken和AuthenticationUser,这很好。我想获得所有登录用户的列表,可以使用SessionRegistry。我想知道SessionRegistry如何注册新会话以及如何注册?我浏览了spring文档,但没有解释它的工作原理。有人能帮忙吗?

成功身份验证后,将使用注册表SessionAuthenticationStrategy向SessionRegistry添加新的会话信息

要实现这一点,首先需要为SessionRegistryBean使用SessionRegistryImpl