摘要: 如何实现给接口或Controller加上我自己的注解就能让他必须登录或者不需要登录就能访问呢? @RequestMapping("/test2") @LoginNotRequired public String test2() { return "test2"; } @RestController 阅读全文
posted @ 2022-01-02 19:23 HumorChen99 阅读(9) 评论(0) 推荐(0) 编辑
摘要: 这样的如何实现?自动注入当前登录的用户id、当前登录的用户对象 @RequestMapping("/test1") public String test1(@UserId Long userId, @LoginedUser User user) { return String.format("tes 阅读全文
posted @ 2022-01-02 19:16 HumorChen99 阅读(4) 评论(0) 推荐(0) 编辑