Please correct me if I'm wrong.
I think @Adam's answer is incomplete. I noticed that sessions already expired in the list were appearing again.
public class UserController {
@Autowired
private SessionRegistry sessionRegistry;
public void listLoggedInUsers() {
final List
Hope it helps.