【问题标题】:Improve authentication [closed]改进身份验证[关闭]
【发布时间】:2018-08-31 16:23:31
【问题描述】:

我用这个代码认证:

@Override
    public boolean preHandle(HttpServletRequest request, HttpServletResponse response, Object handler)
            throws Exception {
        ......
    }

如何使用 Spring Security 重写代码以获得相同的结果?

【问题讨论】:

    标签: java spring spring-boot spring-security


    【解决方案1】:

    您应该使用 Spring Security 来管理身份验证和授权。看来你用了HandlerInterceptor,不推荐。

    https://www.baeldung.com/spring-boot-security-autoconfiguration

    【讨论】:

    • 谢谢,但你能告诉我如何用 Spring Boot 实现代码吗?
    猜你喜欢
    • 1970-01-01
    • 1970-01-01
    • 2012-01-03
    • 1970-01-01
    • 1970-01-01
    • 2021-01-14
    • 2022-01-18
    • 1970-01-01
    • 1970-01-01
    相关资源
    最近更新 更多