Elice-Track-Cloud-4-HanSH / buy-gurus-back

0 stars 0 forks source link

Feat: Aws S3 Bucket Service 개발 - [merged] #72

Closed PromotezCitizen closed 3 weeks ago

PromotezCitizen commented 1 month ago

In GitLab by @HanSanghyeon on Oct 10, 2024, 10:47

Merges develop -> master

Feat:

Refactoring:

PromotezCitizen commented 1 month ago

In GitLab by @mumunuu on Oct 10, 2024, 17:36

Commented on buy-gurus-b/src/main/java/com/team04/buy_gurus/address/dto/AddressInfoRequest.java line 15

이런 형태보다는, 프론트에서 입력을 010-0000-0000으로 받더라도,
DB에 일관되게 저장하기 위해 01000000000 형태로 받고 주는식으로 처리하시는게 좋습니다.

PromotezCitizen commented 1 month ago

In GitLab by @mumunuu on Oct 10, 2024, 17:36

Commented on buy-gurus-b/src/main/java/com/team04/buy_gurus/category/controller/CategoryController.java line 32

좀 더 의미있게 id 대신 categoryId로 사용하시기 바랍니다.

PromotezCitizen commented 1 month ago

In GitLab by @mumunuu on Oct 10, 2024, 17:36

Commented on buy-gurus-b/src/main/java/com/team04/buy_gurus/category/controller/CategoryController.java line 39

카테고리를 생성하는 주소는 /category/에 POST method가 적절하고,
body에 어떤 카테고리를 생성할건지 명시해주시는게 깔끔합니다.

PromotezCitizen commented 1 month ago

In GitLab by @mumunuu on Oct 10, 2024, 17:36

Commented on buy-gurus-b/src/main/java/com/team04/buy_gurus/category/domain/Category.java line 29

자주 지우지 않는 카테고리는 자칫 실수로 지우면 다 날릴 수 있기에 cascade를 굳이 안거셔도 됩니다.

PromotezCitizen commented 1 month ago

In GitLab by @mumunuu on Oct 10, 2024, 17:36

Commented on buy-gurus-b/src/main/java/com/team04/buy_gurus/category/dto/CategoryCreateRequest.java line 14

에러명의 상수는 따로 상수 폴더에서 관리하시기 바랍니다. 이렇게 직접 타이핑 하지마시구요.

PromotezCitizen commented 1 month ago

In GitLab by @mumunuu on Oct 10, 2024, 17:36

Commented on buy-gurus-b/src/main/java/com/team04/buy_gurus/category/repository/CategoryRepository.java line 11

가급적 쿼리를 작성할때, 스키마 명도 함께 작성하시기 바랍니다.

PromotezCitizen commented 1 month ago

In GitLab by @mumunuu on Oct 10, 2024, 17:36

Commented on buy-gurus-b/src/main/java/com/team04/buy_gurus/category/service/CategoryService.java line 37

일일히 이렇게 모든 클래스를 정의할 수 없으니 글로벌 커스텀 익셉션을 하나 만드시고, 거기서 인자를 건네주는 형태로 처리하시기 바랍니다.

PromotezCitizen commented 1 month ago

In GitLab by @mumunuu on Oct 10, 2024, 17:36

Commented on buy-gurus-b/src/main/java/com/team04/buy_gurus/category/service/CategoryService.java line 23

나중에 JPA에서 이렇게 함수명이 길어지니, queryDSL, jooq 라는 기술도 알아보세요.

PromotezCitizen commented 1 month ago

In GitLab by @mumunuu on Oct 10, 2024, 17:36

Commented on buy-gurus-b/src/main/java/com/team04/buy_gurus/config/SecurityConfig.java line 59

Matchers 리스트를 따로 파일로 관리할 수도 있습니다.

PromotezCitizen commented 1 month ago

In GitLab by @mumunuu on Oct 10, 2024, 17:36

Commented on buy-gurus-b/src/main/java/com/team04/buy_gurus/jwt/filter/JwtAuthenticationFilter.java line 41

오잉 doFilterInternal에서 체크해야할 안해야할 URL을 여기서 검증하시는건가요?

PromotezCitizen commented 1 month ago

In GitLab by @mumunuu on Oct 10, 2024, 17:36

Commented on buy-gurus-b/src/main/java/com/team04/buy_gurus/jwt/filter/JwtAuthenticationFilter.java line 69

유저 객체를 principal에 넣어주고 있나요?

PromotezCitizen commented 1 month ago

In GitLab by @mumunuu on Oct 10, 2024, 17:36

Commented on buy-gurus-b/src/main/java/com/team04/buy_gurus/jwt/service/JwtService.java line 42

sub 필드가 무슨 역할을 하는지, jwt 예약어를 모두 공부하시기 바랍니다.

PromotezCitizen commented 1 month ago

In GitLab by @mumunuu on Oct 10, 2024, 17:36

Commented on buy-gurus-b/src/main/java/com/team04/buy_gurus/jwt/service/JwtService.java line 131

상수처리

PromotezCitizen commented 1 month ago

In GitLab by @mumunuu on Oct 10, 2024, 17:36

Commented on buy-gurus-b/src/main/java/com/team04/buy_gurus/orderitem/controller/OrderItemController.java line 24

db 명이 아니라 변수명을 일치시켜주세요.
user_id는 db에서 쓰는 컬럼명이고 보통 에서 쓰는 변수명은 userId가 맞으니, userId로 쓰시는게 맞습니다.

PromotezCitizen commented 1 month ago

In GitLab by @mumunuu on Oct 10, 2024, 17:36

Commented on buy-gurus-b/src/main/java/com/team04/buy_gurus/orderitem/controller/OrderItemController.java line 51

id가 아닌 cartId로 표기하기

PromotezCitizen commented 1 month ago

In GitLab by @mumunuu on Oct 10, 2024, 17:36

Commented on buy-gurus-b/src/main/java/com/team04/buy_gurus/orderitem/controller/OrderItemController.java line 58

RestfulAPI에서 실수를 크게 하고 계신데, userId를 받아와서 그 userId로 지우는게 아니라
스프링 시큐리티에서 JWT로 인증이 끝났고, 그 안에 있는 sub필드를 활용해서 특정 유저 id를 추출해낸 값으로 써야 합니다.

이렇게 하면 내 아이디는 100번인데 올바른 JWT 토큰으로 200번 회원 카트를 모두 지우는 요청을 하게 된다면 제가 100번 회원임에도 불구하고
200번 회원의 카트를 모두 지울 수 있습니다.

PromotezCitizen commented 1 month ago

In GitLab by @mumunuu on Oct 10, 2024, 17:36

Commented on buy-gurus-b/src/main/java/com/team04/buy_gurus/product/controller/ProductController.java line 33

id 가 아닌 productId로 명확히 확인할 수 있도록 바꿔보세요.

PromotezCitizen commented 1 month ago

In GitLab by @mumunuu on Oct 10, 2024, 17:36

Commented on buy-gurus-b/src/main/java/com/team04/buy_gurus/product/service/ProductService.java line 74

not found exception을 하도록 커스텀 익셉션을 사용하도록 합니다.

PromotezCitizen commented 1 month ago

In GitLab by @mumunuu on Oct 10, 2024, 17:36

Commented on buy-gurus-b/src/main/java/com/team04/buy_gurus/review/controller/ReviewController.java line 24

/api/product/{productId}/review가 맞을거 같습니다.

PromotezCitizen commented 1 month ago

In GitLab by @mumunuu on Oct 10, 2024, 17:36

Commented on buy-gurus-b/src/main/java/com/team04/buy_gurus/review/domain/Review.java line 31

위에 import하고 LocalDateTime으로 쓰세요.

PromotezCitizen commented 1 month ago

In GitLab by @mumunuu on Oct 10, 2024, 17:36

Commented on buy-gurus-b/src/main/java/com/team04/buy_gurus/user/controller/UserController.java line 47

스프링 시큐리티를 쓰신거 아닌가요? 비즈니스 로직에서는 비즈니스 로직만 수행해야 합니다.

PromotezCitizen commented 1 month ago

In GitLab by @mumunuu on Oct 10, 2024, 17:36

Commented on buy-gurus-b/src/main/java/com/team04/buy_gurus/user/entity/User.java line 31

변수명은 축약형을 안쓰셨고,db 필드는 img라고 줄여서 하셨는데, 줄이지 않길 추천드립니다.

PromotezCitizen commented 1 month ago

In GitLab by @mumunuu on Oct 10, 2024, 17:36

Commented on buy-gurus-b/src/main/java/com/team04/buy_gurus/user/service/UserService.java line 31

익셉션을 던지라도 클라이언트에 JSON 통신을 명확히 하셔야 합니다.
어떤 에러코드로, 어떤 메세지로 어떤 상태코드로.

PromotezCitizen commented 1 month ago

In GitLab by @Cloud4-Na-Yong-Jin on Oct 10, 2024, 18:23

added 4 commits

Compare with previous version

PromotezCitizen commented 1 month ago

In GitLab by @hoseong on Oct 10, 2024, 19:03

Commented on buy-gurus-b/src/main/java/com/team04/buy_gurus/product/controller/ProductController.java line 33

changed this line in version 3 of the diff

PromotezCitizen commented 1 month ago

In GitLab by @hoseong on Oct 10, 2024, 19:03

Commented on buy-gurus-b/src/main/java/com/team04/buy_gurus/product/service/ProductService.java line 74

changed this line in version 3 of the diff

PromotezCitizen commented 1 month ago

In GitLab by @hoseong on Oct 10, 2024, 19:03

Commented on buy-gurus-b/src/main/java/com/team04/buy_gurus/review/controller/ReviewController.java line 24

changed this line in version 3 of the diff

PromotezCitizen commented 1 month ago

In GitLab by @hoseong on Oct 10, 2024, 19:03

Commented on buy-gurus-b/src/main/java/com/team04/buy_gurus/review/domain/Review.java line 31

changed this line in version 3 of the diff

PromotezCitizen commented 1 month ago

In GitLab by @hoseong on Oct 10, 2024, 19:03

added 11 commits

Compare with previous version

PromotezCitizen commented 1 month ago

In GitLab by @hmy0911 on Oct 11, 2024, 08:49

Commented on buy-gurus-b/src/main/java/com/team04/buy_gurus/orderitem/controller/OrderItemController.java line 24

changed this line in version 4 of the diff

PromotezCitizen commented 1 month ago

In GitLab by @hmy0911 on Oct 11, 2024, 08:49

Commented on buy-gurus-b/src/main/java/com/team04/buy_gurus/orderitem/controller/OrderItemController.java line 51

changed this line in version 4 of the diff

PromotezCitizen commented 1 month ago

In GitLab by @hmy0911 on Oct 11, 2024, 08:49

Commented on buy-gurus-b/src/main/java/com/team04/buy_gurus/orderitem/controller/OrderItemController.java line 58

changed this line in version 4 of the diff

PromotezCitizen commented 1 month ago

In GitLab by @hmy0911 on Oct 11, 2024, 08:49

added 2 commits

Compare with previous version

PromotezCitizen commented 1 month ago

In GitLab by @Cloud4-Na-Yong-Jin on Oct 11, 2024, 10:05

Commented on buy-gurus-b/src/main/java/com/team04/buy_gurus/config/SecurityConfig.java line 59

changed this line in version 5 of the diff

PromotezCitizen commented 1 month ago

In GitLab by @Cloud4-Na-Yong-Jin on Oct 11, 2024, 10:05

Commented on buy-gurus-b/src/main/java/com/team04/buy_gurus/user/controller/UserController.java line 47

changed this line in version 5 of the diff

PromotezCitizen commented 1 month ago

In GitLab by @Cloud4-Na-Yong-Jin on Oct 11, 2024, 10:05

Commented on buy-gurus-b/src/main/java/com/team04/buy_gurus/user/service/UserService.java line 31

changed this line in version 5 of the diff

PromotezCitizen commented 1 month ago

In GitLab by @Cloud4-Na-Yong-Jin on Oct 11, 2024, 10:05

added 3 commits

Compare with previous version

PromotezCitizen commented 1 month ago

In GitLab by @HanSanghyeon on Oct 11, 2024, 14:00

added 2 commits

Compare with previous version

PromotezCitizen commented 1 month ago

In GitLab by @hmy0911 on Oct 11, 2024, 17:16

added 2 commits

Compare with previous version

PromotezCitizen commented 1 month ago

In GitLab by @HanSanghyeon on Oct 11, 2024, 18:06

added 4 commits

Compare with previous version