Skip to content
This repository has been archived by the owner on Aug 13, 2022. It is now read-only.

Redis 적용(Session 처리) #14

Merged
merged 4 commits into from
May 13, 2021
Merged

Redis 적용(Session 처리) #14

merged 4 commits into from
May 13, 2021

Conversation

phantom08266
Copy link
Contributor

세션 불일치 문제를 해결하기 위해 Redis를 이용해 Session 처리

@phantom08266 phantom08266 self-assigned this May 9, 2021
Copy link
Member

@f-lab-dev f-lab-dev left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

병준님도 이 코드 한번 참고해보시면 좋을 것 같네요~


@Component
@EnableRedisHttpSession
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

  1. 이 어노테이션을 달아주면 어떤 일이 벌어지길래 세션 저장소가 redis로 바뀌는걸까요?
  2. 밑에 application.properties에서도 store-type을 정해두셨는데 둘 다 꼭 필요한걸까요?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

  1. springSessionRepositoryFilter빈을 찾아서 등록한 뒤 SessionRepositoryFilter에 RedisIndexedSessionRepository를 주입해 세션들이 Redis에 저장되도록 합니다.
    만약 EnableRedisHttpSession 어노테이션을 사용하지 않았다면 기본적으로 Session객체로 StandardSession을 사용합니다.

  2. 다시 확인해보니 둘다 같은 의미의 설정임으로 어노테이션으로만 설정하도록 수정하겠습니다.

f-lab-dev
f-lab-dev previously approved these changes May 12, 2021
dnjwm8612
dnjwm8612 previously approved these changes May 12, 2021
@phantom08266 phantom08266 changed the base branch from feature/8 to develop May 12, 2021 14:08
@phantom08266 phantom08266 dismissed stale reviews from dnjwm8612 and f-lab-dev May 12, 2021 14:08

The base branch was changed.

@phantom08266 phantom08266 merged commit 77fbdcf into develop May 13, 2021
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
careers
Awaiting triage
Development

Successfully merging this pull request may close these issues.

None yet

4 participants