-
Notifications
You must be signed in to change notification settings - Fork 1
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
Feature/177 : 애플로그인 사용자명 랜덤 세팅 #198
Merged
Merged
Changes from 3 commits
Commits
Show all changes
6 commits
Select commit
Hold shift + click to select a range
7938ff2
:sparkles: Feat: NickName Feign Client 세팅
swa07016 20d4dea
:sparkles: Feat: 애플로그인 랜덤 닉네임 세팅
swa07016 ad4bad9
:sparkles: Feat: 닉네임 생성 관련 상수 분리
swa07016 db5fdf6
:recycle: Refactor: 클라이언트 코드가 랜덤 닉네임 생성에 관여하지 않도록 Adapter 제공
swa07016 3d625cb
:white_check_mark: Test: NickNameGenerator 테스트 코드 작성
swa07016 5ed6b66
:sparkles: Feat: 기본 닉네임 세팅 & 응답 words 기본 빈 리스트 할당
swa07016 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
7 changes: 7 additions & 0 deletions
7
...efing-Common/src/main/java/com/example/briefingcommon/common/constant/BriefingStatic.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,7 @@ | ||
package com.example.briefingcommon.common.constant; | ||
|
||
public class BriefingStatic { | ||
public static final String NICK_NAME_FORMAT = "json"; | ||
public static final int NICK_NAME_COUNT = 1; | ||
public static final int NICK_NAME_MAX_LENGTH = 8; | ||
} |
17 changes: 17 additions & 0 deletions
17
...src/main/java/com/example/briefinginfra/feign/nickname/hwanmoo/client/NickNameClient.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,17 @@ | ||
package com.example.briefinginfra.feign.nickname.hwanmoo.client; | ||
|
||
import com.example.briefinginfra.feign.nickname.hwanmoo.dto.NickNameRes; | ||
import org.springframework.cloud.openfeign.FeignClient; | ||
import org.springframework.stereotype.Component; | ||
import org.springframework.web.bind.annotation.GetMapping; | ||
import org.springframework.web.bind.annotation.RequestParam; | ||
|
||
@FeignClient( | ||
name = "nickNameClient", | ||
url = "https://nickname.hwanmoo.kr" | ||
) | ||
@Component | ||
public interface NickNameClient { | ||
@GetMapping(value = "/") | ||
NickNameRes getNickName(@RequestParam(defaultValue = "json") String format, @RequestParam(defaultValue = "1") int count, @RequestParam(defaultValue = "8") int max_length); | ||
} |
11 changes: 11 additions & 0 deletions
11
...Infra/src/main/java/com/example/briefinginfra/feign/nickname/hwanmoo/dto/NickNameRes.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 com.example.briefinginfra.feign.nickname.hwanmoo.dto; | ||
|
||
import lombok.Getter; | ||
|
||
import java.util.List; | ||
|
||
@Getter | ||
public class NickNameRes { | ||
private List<String> words; | ||
private String seed; | ||
} |
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.
닉네임이 빈 리스트인 경우는 어떻게 될까요?
nickNameWords.stream().findFirst();를 이용하여 null인 경우에 대해 예외처리를 안해도 될지 궁금합니다!