File tree Expand file tree Collapse file tree
src/main/java/com/example/store/user/infrastructure/entity Expand file tree Collapse file tree Original file line number Diff line number Diff line change 77import org .springframework .security .core .authority .SimpleGrantedAuthority ;
88import org .springframework .security .core .userdetails .UserDetails ;
99
10- import java .util .*;
10+ import java .util .Collection ;
11+ import java .util .Set ;
12+ import java .util .UUID ;
13+ import java .util .stream .Collectors ;
1114
1215@ Builder
1316@ NoArgsConstructor
@@ -23,7 +26,7 @@ public class UserEntity implements UserDetails {
2326 @ GeneratedValue
2427 private UUID id ;
2528
26- @ Column (nullable = false ,unique = true )
29+ @ Column (nullable = false , unique = true )
2730 private String email ;
2831
2932 @ Column (nullable = false )
@@ -36,7 +39,7 @@ public class UserEntity implements UserDetails {
3639 public Collection <? extends GrantedAuthority > getAuthorities () {
3740 return roles .stream ()
3841 .map (role -> new SimpleGrantedAuthority ("ROLE_" + role .name ()))
39- .toList ( );
42+ .collect ( Collectors . toSet () );
4043 }
4144
4245 @ Override
You can’t perform that action at this time.
0 commit comments