📜  春季检查机构 - Java 代码示例

📅  最后修改于: 2022-03-11 14:52:24.103000             🧑  作者: Mango

代码示例1
@GetMapping("/users")
public String getUsers() {
    UserDetails details = userDetailsService.loadUserByUsername("mike");
    if (details != null && details.getAuthorities().stream()
      .anyMatch(a -> a.getAuthority().equals("ADMIN"))) {
        // ...
    }
}