Skip to content
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

sessionManagement中的maximumSessions不生效 #4

Closed
midKingKing opened this issue May 6, 2018 · 1 comment
Closed

sessionManagement中的maximumSessions不生效 #4

midKingKing opened this issue May 6, 2018 · 1 comment

Comments

@midKingKing
Copy link

您好,我最近在看您的这系列Blog学习spirng-security的相关知识,但是现在发现sessionMannager设置的maximumSessions不生效,是否是因为redisession的原因,请问您有碰到这个问题么,求解答,谢谢

@longfeizheng
Copy link
Owner

longfeizheng commented May 6, 2018

复写User 类的 ``hashCode()equals()`方法

    @Override
    public int hashCode() {
        return username.hashCode();
    }

    @Override
    public boolean equals(Object rhs) {
        if (rhs instanceof SysUser) {
            return username.equals(((SysUser) rhs).username);
        }
        return false;
    }

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants