SpringSecurity中的鉴权注解 发表于 2023-04-28 更新于 2025-03-11 分类于 Java 阅读次数: Disqus: 本文字数: 203 阅读时长 ≈ 1 分钟 SpringSecurity中的鉴权注解 注解的作用 anonymous() 允许匿名用户访问,不允许已登入用户访问 permitAll() 不管登入,不登入都能访问 Always evaluates to true isAnonymous(): Returns true if the current principal is an anonymous user 1@PreAuthorize("isAnonymous()") 打赏 微信支付 支付宝 本文作者: codezm 本文链接: https://codezm.github.io/posts/Java/1b0c8994.html 版权声明: 本博客所有文章除特别声明外,均采用 BY-NC-SA 许可协议。转载请注明出处!