-
Notifications
You must be signed in to change notification settings - Fork 114
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
전남대 BE_안원모_3주차 과제(3단계) #447
Merged
Merged
Changes from all commits
Commits
Show all changes
49 commits
Select commit
Hold shift + click to select a range
8753eee
STEP0를 위한 기존 코드 가져오기
Wonmoan 0eb427a
Refactor : MebemerController의 else 로직 리펙토링
Wonmoan 5f26e8f
Refactor : RuntimeException 응답방식 수정
Wonmoan 1b6f069
Refactor : JwtService 키 생성방식 최신화
Wonmoan eb87ec1
Refactor : 사용 하지 않는 주석 제거
Wonmoan 16400e6
Refactor : 응답 반환 형식 통일
Wonmoan e4514c0
Refactor : WishController 오류 처리 GlobalExceptionHandler에서 수행하도록 변경
Wonmoan e620367
Refactor : layerd architecture 따른 패키지 구조 조정
Wonmoan 625a5c4
Refactor : JPA 리팩토링에 따른 변경사항 추가
Wonmoan b8a2981
Refactor : wish 테이블 포함한 schema로 수정
Wonmoan 39c50eb
Refactor : Product 도메인 JPA로 리펙토링 엔티티 클래스로 변경
Wonmoan 2b7e729
Refactor : Member 도메인 JPA로 리펙토링 엔티티 클래스로 변경
Wonmoan f991f62
Refactor : 패키지 경로 수정
Wonmoan f7aec38
Refactor : JPA 저장소로 리팩토링
Wonmoan 6cd3537
Feat : @DataJpaTest 활용 회원저장소 테스트 코드 구현
Wonmoan 4389367
Feat : @DataJpaTest 활용 회원저장소 테스트 코드 구현
Wonmoan b1c90bb
Feat : @DataJpaTest 활용 상품저장소 테스트 코드 구현
Wonmoan 0831c87
Feat : @DataJpaTest 활용 위리리스트 테스트 코드 구현
Wonmoan d9ce007
Reafactor : JPA형식에 따른 update 메서드 수정
Wonmoan 448076c
Refactor : JWT 서명 키 수정
Wonmoan f576700
Refactor : 코드 컨벤션에 맞게 수정
Wonmoan 008ad15
Docs : README.md 작성
Wonmoan 75edcc2
Refactor : Member,Product,Wish 도메인 객체 참조 & 외래 키 매핑
Wonmoan 56ba257
Docs : README.md작성
Wonmoan 923e2e3
Refactor : DB 초기데이터 동적 생성,삽입
Wonmoan b5fd6ef
Refactor : 불필요한 어노테이션 삭제
Wonmoan ab9dc63
Refactor : getValidMember 메서드 예외 처리방식 변경
Wonmoan e897194
Refactor : DataLoader 사용 하지 않는 throw 제거
Wonmoan 2282ccc
Refactor : 로깅 포매팅 방식으로 변경
Wonmoan cacfaae
Refactor : 불필요한 어노테이션 삭제
Wonmoan 2e67bfd
Refacotr : 불필요한 throws Exception 제거
Wonmoan 6d0f590
Refactor : id 값 중복으로 받지 않도록 수정
Wonmoan ad48400
Refactor : 기존 controller 에서 예외 처리 방식 resolver로 예외처리 방식으로 변경
Wonmoan 98c2893
Refactor : JwtService 사용하지 않는 메서드 삭제
Wonmoan c5d7da7
Refactor : 코드 가독성 수정
Wonmoan b1184c2
Refactor : Member 도메인 기능 분리, MemberDTO생성
Wonmoan d7982bd
Refactor : Product 도메인 기능 분리 , ProductDTO 생성
Wonmoan e3cdc64
Refactor : 컨트롤러 DTO 받도록 수정
Wonmoan 0b5f982
Refacotr : 불필요한 어노테이션 삭제
Wonmoan 6608fcf
Refactor : JSON 직렬화 수정
Wonmoan 4a1ea83
Refactor : 디버깅 목적 로깅 삭제
Wonmoan 360ab5b
Refactor : 회원 등록시 예외 처리 방식 변경
Wonmoan 54da214
Refactor : wish 도메인 로드 방식 변경
Wonmoan ed9b362
Feat : Product 페이지네이션 구현
Wonmoan f7662bd
Feat : Wish 페이지네이션 구현
Wonmoan 16a7b90
Refactor : DB 초기데이터 동적 생성 초기값 변경
Wonmoan 9523e28
Feat : 숫자 포함된 문자열 정렬 로직 추가
Wonmoan b5778c7
Docs : README.md 작성
Wonmoan b89305d
Merge branch 'wonmoan' into step3
Wonmoan File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,6 +1,9 @@ | ||
package gift.repository; | ||
import gift.domain.Product; | ||
import org.springframework.data.domain.Page; | ||
import org.springframework.data.domain.Pageable; | ||
import org.springframework.data.jpa.repository.JpaRepository; | ||
|
||
public interface ProductRepository extends JpaRepository<Product, Long> { | ||
Page<Product> findAll(Pageable pageable); | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,10 +1,12 @@ | ||
package gift.repository; | ||
import gift.domain.Wish; | ||
|
||
import org.springframework.data.domain.Page; | ||
import org.springframework.data.domain.Pageable; | ||
import org.springframework.data.jpa.repository.JpaRepository; | ||
import java.util.List; | ||
|
||
public interface WishRepository extends JpaRepository<Wish, Long> { | ||
List<Wish> findAllByMemberId(Long memberId); | ||
void deleteByMemberIdAndProductId(Long memberId, Long productId); | ||
Page<Wish> findAllByMemberId(Long memberId, Pageable pageable); | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,42 @@ | ||
package gift.util; | ||
|
||
import java.util.Comparator; | ||
|
||
public class AlphanumericComparator implements Comparator<String> { | ||
|
||
@Override | ||
public int compare(String o1, String o2) { | ||
if (o1 == null || o2 == null) { | ||
return o1 == null ? -1 : 1; | ||
} | ||
|
||
int i = 0, j = 0; | ||
while (i < o1.length() && j < o2.length()) { | ||
char c1 = o1.charAt(i); | ||
char c2 = o2.charAt(j); | ||
|
||
if (Character.isDigit(c1) && Character.isDigit(c2)) { | ||
int num1 = 0, num2 = 0; | ||
while (i < o1.length() && Character.isDigit(o1.charAt(i))) { | ||
num1 = num1 * 10 + (o1.charAt(i) - '0'); | ||
i++; | ||
} | ||
while (j < o2.length() && Character.isDigit(o2.charAt(j))) { | ||
num2 = num2 * 10 + (o2.charAt(j) - '0'); | ||
j++; | ||
} | ||
if (num1 != num2) { | ||
return Integer.compare(num1, num2); | ||
} | ||
} else { | ||
if (c1 != c2) { | ||
return Character.compare(c1, c2); | ||
} | ||
i++; | ||
j++; | ||
} | ||
} | ||
|
||
return Integer.compare(o1.length(), o2.length()); | ||
} | ||
} |
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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.
알고리즘 코드 보고 가져온 것 같은 느낌이 강한데,
이왕이면 이 코드도 변수명, 메서드 분리 등
컨벤션을 신경써서 작성해보면 좋을 것 같아요.