-
Notifications
You must be signed in to change notification settings - Fork 3
[Resolves #6] redis config 설정 및 테스트 코드 #5
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[Resolves #6] redis config 설정 및 테스트 코드 #5
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
PR 제목 컨벤션에 맞춰서 바꿔야할 것 같은데
아직 스냅샷 기능 구현 다 한건 아니라서 Resolves 쓰기는 애매하넹
제 생각엔 그냥 레디스 환경설정 이슈 만들어서 그거 닫는게 무난할 거 같긴한데 언니 생각도 남겨주세용~
/* | ||
Spring Data Redis는 Redis에 두 가지 접근 방식을 제공합니다. | ||
하나는 RedisTemplate을 이용한 방식이며, 다른 하나는 RedisRepository를 이용한 방식 | ||
|
||
두 방식 모두 Redis에 접근하기 위해서는 Redis 저장소와 연결하는 과정이 필요 | ||
이 과정을 위해 RedisConnectionFactory 인터페이스(LettuceConnectionFactory )를 사용 | ||
* */ | ||
@Bean //redisConnectionFactory 이름의 빈(역할)은 LettuceConnectionFactory(host, port)를 구현체로 선택한 것 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
요런 주석은 코드에 남기기보다는 PR이나 노션에 남겨주면 좋을 듯 🙃
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
스냅샷 이슈 만들어서 그거 닫는다는 게 그냥 스냅샷 구현 끝내고 한 번에 pr 올리라는 거,,,? 제목은 곧 수정하겠슴당
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
아 스냅샷 이슈가 아니라 레디스 환경설정 이슈 잘못 말했어용
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
ㅇㅎㅇㅎ,, 근데 그러면 지금 이슈를 하나 파야 하나,,,?
|
||
System.out.println("result = " + result); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
콘솔보다는 Assertion으로 검증하는게 나을 듯?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
요건 그냥 어케 나오는지 확인해보려고 쓴 건데, 약간 혼자 확인용은 앞으로 지우겠슴당
// assertThat(expire).isTrue(); | ||
// assertThat(s).isNull(); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
요건 왜 주석처리되어있나용 🧐
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
이것두 아마,,, 혼자 뭐 확인하려고 그런 거 같은데,,, 쓰지 않는 주석은 지우겠슴당,,,
//@ActiveProfiles("test") | ||
//@AutoConfigureTestDatabase(replace = Replace.AUTO_CONFIGURED) // 실제 DB 사용하고 싶을때 NONE 사용 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Test 프로파일 사용해도 좋은 것 같은데 왜 주석 처리에용? 🤔
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
아직 test profile이 딱히 없어서 주석 처리 한 것 같아용
앞으로 쓰지 않는 주석?은 모두 지우는 게 깔끔한 것 같네용
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
좋아용~~ 🙌
public static class RedisUserDto{ | ||
private String name; | ||
private String password; | ||
|
||
public RedisUserDto(String name, String password){ | ||
this.name = name; | ||
this.password = password; | ||
} | ||
|
||
public RedisUserDto() { | ||
|
||
} | ||
|
||
public String getName(){ | ||
return this.name; | ||
} | ||
|
||
public String getPassword(){ | ||
return this.password; | ||
} | ||
|
||
} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
이거 어노테이션으로 일일히 작성하는 거 대체할 수 있지않나?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
근데 나 그래서 하려고 했는데 자꾸 에러가 떠서 못 했어,, 저거 testCode 안에서는 @Getter 이런 걸 못 쓰남,,?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
흠 한번 끌어와서 시도해볼겡
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
ㅠㅠㅠ 감사합니당 ㅎㅎ
- Problem - Level : Problem만 단방향으로 연관 가짐 - Problem - ProblemCategory - Category : Problem만 ProblemCategory와 양방향 연관 가짐 (카테고리별 문제 조회 필요할 경우에 Category에 연관 설정할 것) - Problem 연관 객체 Eager로 가져오도록 설정 (논의 필요)
29c13d9
to
fdc8392
Compare
* chore : add config for redis * chore: add config for redis * test: add test for redis * feat: 엔티티 작성 - Problem - Level : Problem만 단방향으로 연관 가짐 - Problem - ProblemCategory - Category : Problem만 ProblemCategory와 양방향 연관 가짐 (카테고리별 문제 조회 필요할 경우에 Category에 연관 설정할 것) - Problem 연관 객체 Eager로 가져오도록 설정 (논의 필요) * feat: Repository 작성 * refactor: 필요 없는 gitkeep 삭제 * feat: 엔티티 작성 #1 * refactor : 필요없는 주석 삭제 #6 * refactor : 콘솔 확인 삭제 #6 Co-authored-by: Subin Min <tnqls5417@naver.com>
* chore : add config for redis * chore: add config for redis * test: add test for redis * feat: 엔티티 작성 - Problem - Level : Problem만 단방향으로 연관 가짐 - Problem - ProblemCategory - Category : Problem만 ProblemCategory와 양방향 연관 가짐 (카테고리별 문제 조회 필요할 경우에 Category에 연관 설정할 것) - Problem 연관 객체 Eager로 가져오도록 설정 (논의 필요) * feat: Repository 작성 * refactor: 필요 없는 gitkeep 삭제 * feat: 엔티티 작성 #1 * refactor : 필요없는 주석 삭제 #6 * refactor : 콘솔 확인 삭제 #6 Co-authored-by: Subin Min <tnqls5417@naver.com>
작업 목록
redis config 파일 작성
redis 관련 테스트 코드 추가
논의 사항