g-market / b-shop-backend

0 stars 0 forks source link

feat: Redis 장바구니 구현 및 리프레시 토큰 리팩토링 - [merged] #72

Closed halucinor closed 1 year ago

halucinor commented 1 year ago

In GitLab by @haaeee on Feb 19, 2023, 16:27

_Merges feature/redis_authcart -> develop

작업 내용

Redis Config : key, value String Serializer 사용으로 변경

public RedisTemplate<String, String> redisTemplate() {
        final RedisTemplate<String, String> redisTemplate = new RedisTemplate<>();
        redisTemplate.setConnectionFactory(redisConnectionFactory());
        redisTemplate.setKeySerializer(new StringRedisSerializer());
        redisTemplate.setValueSerializer(new StringRedisSerializer());
//...

RefreshToken : key(RefreshToken uuid): value(RefreshToken(String))로 변경

장바구니 : key(cart:memberId)- hashKey(itemId+itemOptionId)-hashValue(CartDto)

public record CartDto(
    Long itemId,
    Long itemOptionId,
    int orderCount
) {
}

주의사항

Issues #33

halucinor commented 1 year ago

In GitLab by @haaeee on Feb 19, 2023, 16:27

requested review from @rkdud1108

halucinor commented 1 year ago

In GitLab by @halucinor on Feb 20, 2023, 11:23

Commented on src/main/java/com/gabia/bshop/mapper/CartResponseMapper.java line 31

추후에 이렇게 하면 될 것 같습니다.

.imageUrl(itemOption.getItem().getThumbnail())
halucinor commented 1 year ago

In GitLab by @haaeee on Feb 21, 2023, 16:25

added 6 commits

Compare with previous version

halucinor commented 1 year ago

In GitLab by @halucinor on Feb 21, 2023, 17:02

Commented on src/main/java/com/gabia/bshop/config/RedisConfig.java line 25

Object를 String으로 바꿔준 이유가 있을까요?

halucinor commented 1 year ago

In GitLab by @halucinor on Feb 21, 2023, 17:04

Commented on src/main/java/com/gabia/bshop/dto/request/CartCreateRequest.java line 16

주문이 0개일 경우에도 카트에 들어갈 수 있도록 되어있나요?

halucinor commented 1 year ago

In GitLab by @haaeee on Feb 22, 2023, 10:12

Commented on src/main/java/com/gabia/bshop/mapper/CartResponseMapper.java line 31

changed this line in version 3 of the diff

halucinor commented 1 year ago

In GitLab by @haaeee on Feb 22, 2023, 10:12

added 10 commits

Compare with previous version

halucinor commented 1 year ago

In GitLab by @haaeee on Feb 22, 2023, 10:24

Commented on src/main/java/com/gabia/bshop/config/RedisConfig.java line 25

ObjectMapper를 사용해서 Object 자체를 mapper를 통해 String으로 저장하려고 변경하였습니다.

매번 형 변환을 해주는 번거로움이 존재하여 이를 String으로 처리하였습니다.

Util클래스에 존재하는 RedisValueSupport와 CartRepository, RefreshToken Repository 코드 읽어보시면

이해되실 것 같습니다!

halucinor commented 1 year ago

In GitLab by @haaeee on Feb 22, 2023, 10:26

added 1 commit

Compare with previous version

halucinor commented 1 year ago

In GitLab by @haaeee on Feb 22, 2023, 10:26

Commented on src/main/java/com/gabia/bshop/dto/request/CartCreateRequest.java line 16

81519105

다음과 같이 수정하였습니다.

0을 생각을 못하였네요. ㅎㅎ

halucinor commented 1 year ago

In GitLab by @halucinor on Feb 22, 2023, 11:54

resolved all threads

halucinor commented 1 year ago

In GitLab by @haaeee on Feb 22, 2023, 13:02

mentioned in commit 93614fe0898219e8e03edbf0a32013b0c0b5915d

halucinor commented 1 year ago

In GitLab by @haaeee on Feb 22, 2023, 13:02

mentioned in commit b2677a4d637a04c6d3c5c30518de6734bac4063e

halucinor commented 1 year ago

In GitLab by @haaeee on Mar 7, 2023, 10:00

mentioned in commit 07d25fd7dbcc3ecadd855f90f140b2f2b61d3c1f

halucinor commented 1 year ago

In GitLab by @halucinor on Mar 8, 2023, 17:23

mentioned in commit 2e0e481faed37aba8c40035da5d200b28c6ed1af

halucinor commented 1 year ago

In GitLab by @halucinor on Mar 8, 2023, 22:35

mentioned in commit 9b6efe6bde5fbf30a19e6118d5a5900e2e962383

halucinor commented 1 year ago

In GitLab by @rkdud1108 on Mar 18, 2023, 12:58

mentioned in commit f69407b6bce153198d48f198c33983b58b0e3a85