forked from kookmin-sw/cap-template
-
Notifications
You must be signed in to change notification settings - Fork 3
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
refactor: 디렉토리 구조 변경 - 리포지토리, dto 분리
- Loading branch information
1 parent
67716d8
commit 906d639
Showing
81 changed files
with
416 additions
and
334 deletions.
There are no files selected for viewing
358 changes: 177 additions & 181 deletions
358
src/main/java/capstone/facefriend/DummyInitializer.java
Large diffs are not rendered by default.
Oops, something went wrong.
8 changes: 4 additions & 4 deletions
8
src/main/java/capstone/facefriend/auth/controller/AuthController.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
8 changes: 0 additions & 8 deletions
8
src/main/java/capstone/facefriend/auth/controller/dto/TokenResponse.java
This file was deleted.
Oops, something went wrong.
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
2 changes: 1 addition & 1 deletion
2
.../facefriend/auth/domain/GoogleMember.java → ...riend/auth/domain/oauth/GoogleMember.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 |
---|---|---|
@@ -1,4 +1,4 @@ | ||
package capstone.facefriend.auth.domain; | ||
package capstone.facefriend.auth.domain.oauth; | ||
|
||
import java.util.Map; | ||
|
||
|
2 changes: 1 addition & 1 deletion
2
...e/facefriend/auth/domain/OAuthMember.java → ...friend/auth/domain/oauth/OAuthMember.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
35 changes: 35 additions & 0 deletions
35
src/main/java/capstone/facefriend/auth/domain/oauth/Provider.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,35 @@ | ||
package capstone.facefriend.auth.domain.oauth; | ||
|
||
import capstone.facefriend.auth.exception.AuthException; | ||
import capstone.facefriend.auth.exception.AuthExceptionType; | ||
|
||
import java.util.Arrays; | ||
import java.util.Map; | ||
import java.util.function.Function; | ||
|
||
public enum Provider { | ||
|
||
GOOGLE("google", GoogleMember::new), | ||
; | ||
|
||
private final String providerName; | ||
private final Function<Map<String, Object>, OAuthMember> function; | ||
|
||
Provider(String providerName, Function<Map<String, Object>, OAuthMember> function) { | ||
this.providerName = providerName; | ||
this.function = function; | ||
} | ||
|
||
public static Provider from(String name) { | ||
return Arrays.stream(values()) | ||
.filter(it -> it.providerName.equals(name)) | ||
.findFirst() | ||
.orElseThrow(() -> new AuthException(AuthExceptionType.INVALID_AUTH_PROVIDER)); | ||
} | ||
|
||
public OAuthMember getOAuthMember(Map<String, Object> body) { | ||
return function.apply(body); | ||
// function 은 GoogleMember 의 생성자를 의미 | ||
// GoogleMember 생성자의 파라미터에 request body (=Map<String, Object>) 넣어서 OAuthMember 객체 반환 | ||
} | ||
} |
2 changes: 1 addition & 1 deletion
2
src/main/java/capstone/facefriend/auth/domain/token/TokenProvider.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
...auth/controller/dto/LoginUriResponse.java → ...facefriend/auth/dto/LoginUriResponse.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
...d/auth/service/dto/OAuthLoginRequest.java → ...acefriend/auth/dto/OAuthLoginRequest.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
...end/auth/service/dto/OAuthUriRequest.java → .../facefriend/auth/dto/OAuthUriRequest.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
11 changes: 11 additions & 0 deletions
11
src/main/java/capstone/facefriend/auth/dto/TokenResponse.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,11 @@ | ||
package capstone.facefriend.auth.dto; | ||
|
||
import capstone.facefriend.auth.domain.token.AccessToken; | ||
import capstone.facefriend.auth.domain.token.RefreshToken; | ||
|
||
public record TokenResponse( | ||
AccessToken accessToken, | ||
RefreshToken refreshToken, | ||
Long memberId | ||
) { | ||
} |
2 changes: 1 addition & 1 deletion
2
src/main/java/capstone/facefriend/auth/infrastructure/JwtProvider.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
6 changes: 3 additions & 3 deletions
6
src/main/java/capstone/facefriend/auth/infrastructure/RestTemplateOAuthRequester.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
2 changes: 1 addition & 1 deletion
2
src/main/java/capstone/facefriend/auth/service/OAuthProviderProperties.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
6 changes: 3 additions & 3 deletions
6
src/main/java/capstone/facefriend/auth/service/OAuthRequester.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
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
2 changes: 1 addition & 1 deletion
2
...e/dto/chatroom/ChatRoomCloseResponse.java → ...t/dto/chatroom/ChatRoomCloseResponse.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
...e/dto/chatroom/ChatRoomEmptyResponse.java → ...t/dto/chatroom/ChatRoomEmptyResponse.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
...e/dto/chatroom/ChatRoomEnterResponse.java → ...t/dto/chatroom/ChatRoomEnterResponse.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
4 changes: 1 addition & 3 deletions
4
...ce/dto/chatroom/ChatRoomExitResponse.java → ...at/dto/chatroom/ChatRoomExitResponse.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
...e/dto/chatroom/ChatRoomHeartResponse.java → ...t/dto/chatroom/ChatRoomHeartResponse.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
...ce/dto/chatroom/ChatRoomLeftResponse.java → ...at/dto/chatroom/ChatRoomLeftResponse.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
...dto/chatroom/ChatRoomMessageResponse.java → ...dto/chatroom/ChatRoomMessageResponse.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
...ce/dto/chatroom/ChatRoomOpenResponse.java → ...at/dto/chatroom/ChatRoomOpenResponse.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
...rvice/dto/heart/GetSendHeartResponse.java → .../chat/dto/heart/GetSendHeartResponse.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
.../service/dto/heart/HeartReplyRequest.java → ...end/chat/dto/heart/HeartReplyRequest.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
...service/dto/heart/HeartReplyResponse.java → ...nd/chat/dto/heart/HeartReplyResponse.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
...t/service/dto/heart/SendHeartRequest.java → ...iend/chat/dto/heart/SendHeartRequest.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
.../service/dto/heart/SendHeartResponse.java → ...end/chat/dto/heart/SendHeartResponse.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
...rvice/dto/message/GetMessageResponse.java → .../chat/dto/message/GetMessageResponse.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
...rvice/dto/message/MessageListRequest.java → .../chat/dto/message/MessageListRequest.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
...vice/dto/message/MessageListResponse.java → ...chat/dto/message/MessageListResponse.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
...t/service/dto/message/MessageRequest.java → ...iend/chat/dto/message/MessageRequest.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
.../service/dto/message/MessageResponse.java → ...end/chat/dto/message/MessageResponse.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
Oops, something went wrong.