-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[feat] : 회원 엔티티와 회원가입 api 구현 절반 / 패키지 구조 변경 (#20)
* [refactor] : 패키지 구조 변 * [refactor] : 패키지 구조 변경 * [refactor] : 안쓰는 history 삭제 * [feat] : 암호화 엔티티 추 * [feat] : 서비스, 레포지토리, dto, validation 의존성 추가 * [refactor] : 안쓰는 레포 메서드 삭제 * [refactor] : 컨플릭 해결 - 머지하면서 기존 패키지가 남아있어서 지워줌
- Loading branch information
1 parent
a658d4a
commit 79e8551
Showing
39 changed files
with
282 additions
and
157 deletions.
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
3 changes: 1 addition & 2 deletions
3
.../handsup/domain/auction/AuctionImage.java → .../handsup/auction/domain/AuctionImage.java
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
7 changes: 3 additions & 4 deletions
7
...omain/auction/history/BiddingHistory.java → ...andsup/auction/domain/BiddingHistory.java
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
5 changes: 2 additions & 3 deletions
5
.../dev/handsup/domain/auction/Bookmark.java → .../dev/handsup/auction/domain/Bookmark.java
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
5 changes: 2 additions & 3 deletions
5
...a/dev/handsup/domain/auction/Comment.java → ...a/dev/handsup/auction/domain/Comment.java
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
2 changes: 1 addition & 1 deletion
2
...ion/auction_category/ProductCategory.java → ...ain/auction_category/ProductCategory.java
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
5 changes: 2 additions & 3 deletions
5
...auction_category/ProductCategoryLike.java → ...auction_category/ProductCategoryLike.java
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
2 changes: 1 addition & 1 deletion
2
...uction_category/ProductCategoryValue.java → ...uction_category/ProductCategoryValue.java
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
2 changes: 1 addition & 1 deletion
2
.../auction/auction_field/AuctionStatus.java → ...n/domain/auction_field/AuctionStatus.java
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
2 changes: 1 addition & 1 deletion
2
...ain/auction/auction_field/Coordinate.java → ...tion/domain/auction_field/Coordinate.java
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
2 changes: 1 addition & 1 deletion
2
.../auction/auction_field/ProductStatus.java → ...n/domain/auction_field/ProductStatus.java
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
2 changes: 1 addition & 1 deletion
2
...n/auction/auction_field/PurchaseTime.java → ...on/domain/auction_field/PurchaseTime.java
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
2 changes: 1 addition & 1 deletion
2
...in/auction/auction_field/TradeMethod.java → ...ion/domain/auction_field/TradeMethod.java
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
18 changes: 18 additions & 0 deletions
18
core/src/main/java/dev/handsup/auth/domain/BcryptImpl.java
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,18 @@ | ||
package dev.handsup.auth.domain; | ||
|
||
import org.mindrot.jbcrypt.BCrypt; | ||
import org.springframework.stereotype.Component; | ||
|
||
@Component | ||
public class BcryptImpl implements EncryptHelper { | ||
|
||
@Override | ||
public String encrypt(String plainPassword) { | ||
return BCrypt.hashpw(plainPassword, BCrypt.gensalt()); | ||
} | ||
|
||
@Override | ||
public boolean isMatch(String plainPassword, String hashedPassword) { | ||
return BCrypt.checkpw(plainPassword, hashedPassword); | ||
} | ||
} |
6 changes: 6 additions & 0 deletions
6
core/src/main/java/dev/handsup/auth/domain/EncryptHelper.java
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,6 @@ | ||
package dev.handsup.auth.domain; | ||
|
||
public interface EncryptHelper { | ||
String encrypt(String plainPassword); | ||
boolean isMatch(String plainPassword, String hashedPassword); | ||
} |
3 changes: 1 addition & 2 deletions
3
.../dev/handsup/domain/chat/ChatMessage.java → .../dev/handsup/chat/domain/ChatMessage.java
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
5 changes: 2 additions & 3 deletions
5
...ava/dev/handsup/domain/chat/ChatRoom.java → ...ava/dev/handsup/chat/domain/ChatRoom.java
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 |
---|---|---|
|
@@ -20,5 +20,4 @@ public abstract class TimeBaseEntity { | |
|
||
@LastModifiedDate | ||
private LocalDateTime updatedAt; | ||
|
||
} | ||
} |
20 changes: 20 additions & 0 deletions
20
core/src/main/java/dev/handsup/common/exception/CommonValidationError.java
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,20 @@ | ||
package dev.handsup.common.exception; | ||
|
||
import static lombok.AccessLevel.*; | ||
|
||
import lombok.NoArgsConstructor; | ||
|
||
@NoArgsConstructor(access = PRIVATE) | ||
public final class CommonValidationError { | ||
|
||
private static final String NOT_NULL_POSTFIX = " 는 Null 이 될 수 없습니다"; | ||
private static final String NOT_EMPTY_POSTFIX = " 는 Empty 가 될 수 없습니다"; | ||
|
||
public static String getNotNullMessage(String object, String variable) { | ||
return object + "_" + variable + NOT_NULL_POSTFIX; | ||
} | ||
|
||
public static String getNotEmptyMessage(String object, String variable) { | ||
return object + "_" + variable + NOT_EMPTY_POSTFIX; | ||
} | ||
} |
8 changes: 8 additions & 0 deletions
8
core/src/main/java/dev/handsup/common/exception/ErrorCode.java
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,8 @@ | ||
package dev.handsup.common.exception; | ||
|
||
public interface ErrorCode { | ||
|
||
String getMessage(); | ||
|
||
String getCode(); | ||
} |
14 changes: 14 additions & 0 deletions
14
core/src/main/java/dev/handsup/common/exception/NotFoundException.java
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,14 @@ | ||
package dev.handsup.common.exception; | ||
|
||
import lombok.Getter; | ||
|
||
@Getter | ||
public class NotFoundException extends RuntimeException { | ||
|
||
private final String code; | ||
|
||
public NotFoundException(ErrorCode errorCode) { | ||
super(errorCode.getMessage()); | ||
this.code = errorCode.getCode(); | ||
} | ||
} |
14 changes: 14 additions & 0 deletions
14
core/src/main/java/dev/handsup/common/exception/ValidationException.java
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,14 @@ | ||
package dev.handsup.common.exception; | ||
|
||
import lombok.Getter; | ||
|
||
@Getter | ||
public class ValidationException extends RuntimeException { | ||
|
||
private final String code; | ||
|
||
public ValidationException(ErrorCode errorCode) { | ||
super(errorCode.getMessage()); | ||
this.code = errorCode.getCode(); | ||
} | ||
} |
49 changes: 0 additions & 49 deletions
49
core/src/main/java/dev/handsup/domain/auction/history/BuyingHistory.java
This file was deleted.
Oops, something went wrong.
49 changes: 0 additions & 49 deletions
49
core/src/main/java/dev/handsup/domain/auction/history/SellingHistory.java
This file was deleted.
Oops, something went wrong.
Oops, something went wrong.