Notice
Recent Posts
Recent Comments
Link
일 | 월 | 화 | 수 | 목 | 금 | 토 |
---|---|---|---|---|---|---|
1 | 2 | 3 | 4 | |||
5 | 6 | 7 | 8 | 9 | 10 | 11 |
12 | 13 | 14 | 15 | 16 | 17 | 18 |
19 | 20 | 21 | 22 | 23 | 24 | 25 |
26 | 27 | 28 | 29 | 30 | 31 |
Tags
- springsecurity
- multimodule testcontainers
- S3
- RefreshToken
- 소수찾기 java
- 형상관리
- ObjectOptimisticLockingFailureException
- 멀티모듈 테스트컨테이너
- spring DI
- aop
- jpa
- redissonlock aop
- OptimisticLock
- DI
- TestContainers
- ObjectOptimisticLockingFailureException 처리
- interface
- @transactional
- 낙관적 락 재시도
- Spring Cloud Gateway
- spring aop
- 알고리즘
- AccessToken
- Invalid property 'principal.username' of bean class
- java
- 우아한 테크러닝
- netty
- 백준
- kotest testcontainers
- 낙관적 락 롤백
Archives
- Today
- Total
목록Invalid property 'principal.username' of bean class [org.springframework.security.authentication.UsernamePasswordAuthenticationToken]: Bean property 'principal.username' is not readable or has an invalid getter method: Does the return type of the getter m (1)
조급하면 모래성이 될뿐
SpringSecurity 활용하여 계정 권한에 따른 접근을 제어해보기
목표 로그인 계정이 가지고 있지 않은 URL에 정말 접속이 안되는지 확인해보자! 이전 글에서, SpringSecurity를 활용하기 위한 설정을 마치고 DB에 접근하여 로그인까지 확인해 보았다. 이제는 TEST계정이 가진 권한을 조회에서, 우리가 설정한 config에 해당하는 URL에만 접속이 가능한지 확인해보자. * TEST계정은 ADMIN, MEMBER의 권한만 주었다. .antMatchers("/admin").hasRole("ADMIN") // 괄호의 권한을 가진 유저만 접근가능, ROLE_가 붙어서 적용 됨. 즉, 테이블에 ROLE_권한명 으로 저장해야 함. .antMatchers("/user").hasRole("USER") .antMatchers("/member").hasRole("MEMBER"..
구현 기록/SpringSecurity
2020. 2. 10. 16:58