-
Notifications
You must be signed in to change notification settings - Fork 11
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
[STEP2-4] Add Feature Blocking domains #113
base: sunsun512
Are you sure you want to change the base?
Conversation
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.
step 2-2 맞나요? 2-4 같습니다.
public class UrlShortenService { | ||
|
||
private final BlackListService blackListService; |
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.
service 간 호출이 이루어지고 있네요. service 레이어의 구분에 대해 고민해주세요.
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.
BlockedDomainInterface 으로 레이어를 구분했습니다.
src/main/java/community/whatever/onembackendjava/api/service/UrlShortenService.java
Outdated
Show resolved
Hide resolved
@@ -35,6 +38,9 @@ public ShortenUrlDto.Create.Response shortenUrlCreate(ShortenUrlDto.Create.Reque | |||
if (validateOriginUrl(param.getOriginUrl())) { | |||
throw BusinessExceptionGenerator.createBusinessException("DB001"); | |||
} | |||
if(isBlocked(param.getOriginUrl())){ | |||
throw BusinessExceptionGenerator.createBusinessException("DB004"); | |||
} |
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.
이런 형식이라면 ErrorCode enum 을 매개변수로 받는게 낫지 않나요?
src/main/java/community/whatever/onembackendjava/common/util/BlackListService.java
Show resolved
Hide resolved
- BlockedDomain을 csvv 파일을 업로드 받아서 하는 것으로 변경 - BlockedDomain을 domain layer단으로 변경
…omain # Conflicts: # src/main/resources/application-dev.yml
변동사항