AuthenticationPrincipal 권한 비교1 [spring] @AuthenticationPrincipal 권한 비교 controller public MemberDto findMember(@AuthenticationPrincipal U principal , @Parameter(name = "page", in = ParameterIn.QUERY) Pageable pageable ) { return MemberService.findMember(principal, pageable); } service @Override public MemberDto findMember(U principal, Pageable pageable) { memberService.findMember(pageable); // 권한 확인 if(principal.getAuthorities().toString().equals("[SUPER_ADMIN]")){ .. 2022. 12. 8. 이전 1 다음