기간
2023/4/17 ~ 2023/4/21
수업
실시간 ZOOM 수업
Session의 Security ContextHolder의 Authentication 객체에 UserDetails(유저 오브젝트), Credential(비번), Authority(권한) 저장
UserDetailsImpl에 오버라이드한 getAuthorities()메소드의 authorities.add(()-> "ROLE_"+user.getRole());
는 문법 ROLE_ADMIN 이런 식
근데 SecurityConfig의 hasRole에는 SecurityExpressionRoot
의 defaultRolePrefix
에 “ROLE_”로 되어 있어서 hasRole(”ADMIN”)이런 식으로 넣어야 함……
intellij에서 .http로 api 테스트할 수 있음
@EntityGraph()쓰지 말자
웬만하면 Lazy Loading하고 N+1은 fetch join으로 해결