-
Notifications
You must be signed in to change notification settings - Fork 90
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
[예지니어스] 4단계 - HTTP 웹 서버 리팩토링 미션 제출합니다. #204
Open
YejiAhn
wants to merge
13
commits into
woowacourse:yejiahn
Choose a base branch
from
YejiAhn:yejiahn4
base: yejiahn
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Changes from all commits
Commits
Show all changes
13 commits
Select commit
Hold shift + click to select a range
492b8bf
refactor: HandlebarsHelper 클래스의 메서드를 static으로 처리
YejiAhn ecd47ba
refactor: UrlMapper 인스턴스 변수에 final 키워드 추가
YejiAhn a9f53cd
refactor: 싱글턴패턴을 사용하는 UrlMapper 클래스의 생성자 접근제어자 private으로 변경
YejiAhn 8579ca7
refactor: 싱글턴패턴을 사용하는 클래스들의 생성자 접근제어자 private으로 변경
YejiAhn daca838
refactor: 여러 스레드들이 접근할 수 있는 HashMap을 ConcurrentHashMap로 변경
YejiAhn d1cc999
refactor: 쓰이지 않는 클래스와 필요없는 개행 제거
YejiAhn 523ea15
refactor: build.gradle에 compile 설정을 implementation으로 변경
YejiAhn 099d2a5
refactor: 생성자 중복 제거
YejiAhn 91dc672
refactor: 매직스트링 상수화
YejiAhn 4857f5f
refactor: Builder 어노테이션 생성자에 적용
YejiAhn d461699
test: 깨지는 테스트 돌아가게 리팩터링
YejiAhn 3ea4964
refactor: 파일 위치 적절하게 이동
YejiAhn 8551136
feat: 멀티모듈 분리
YejiAhn 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
plugins { | ||
id 'java' | ||
} | ||
|
||
version '1.0.0' | ||
|
||
repositories { | ||
mavenCentral() | ||
} | ||
|
||
dependencies { | ||
testCompile group: 'junit', name: 'junit', version: '4.12' | ||
} |
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,37 @@ | ||
import controller.CreateUserController; | ||
import controller.ListController; | ||
import controller.RootController; | ||
import controller.UserLoginController; | ||
import domain.UrlMapper; | ||
import domain.controller.Controller; | ||
import domain.controller.FrontController; | ||
import java.io.IOException; | ||
import java.util.HashMap; | ||
import java.util.Map; | ||
import org.slf4j.Logger; | ||
import org.slf4j.LoggerFactory; | ||
|
||
public class Application { | ||
|
||
private static final Logger logger = LoggerFactory.getLogger(RequestHandler.class); | ||
|
||
private static final Controller CONTROLLER; | ||
|
||
static { | ||
Map<String, Controller> urlMapper = new HashMap<>(); | ||
urlMapper.put("/user/create", CreateUserController.getInstance()); | ||
urlMapper.put("/user/login", UserLoginController.getInstance()); | ||
urlMapper.put("/", RootController.getInstance()); | ||
urlMapper.put("/user/list", ListController.getInstance()); | ||
CONTROLLER = new FrontController(new UrlMapper(urlMapper)); | ||
} | ||
|
||
public static void main(String[] args) throws Exception { | ||
try { | ||
WebServer.main(args, CONTROLLER); | ||
} catch (IOException e) { | ||
logger.error(e.getMessage()); | ||
e.printStackTrace(); | ||
} | ||
} | ||
} |
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
31 changes: 18 additions & 13 deletions
31
...pplication/controller/ListController.java → .../main/java/controller/ListController.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: 6 additions & 5 deletions
11
...pplication/controller/RootController.java → .../main/java/controller/RootController.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
21 changes: 13 additions & 8 deletions
21
...ation/controller/UserLoginController.java → .../java/controller/UserLoginController.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
src/main/java/db/DataBase.java → ...ion-module/src/main/java/db/DataBase.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
14 changes: 9 additions & 5 deletions
14
...va/web/application/domain/model/User.java → ...dule/src/main/java/domain/model/User.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
...java/web/application/dto/ResponseDto.java → ...module/src/main/java/dto/ResponseDto.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 web.application.dto; | ||
package dto; | ||
|
||
public abstract class ResponseDto { | ||
|
||
|
4 changes: 2 additions & 2 deletions
4
...web/application/dto/UserListResponse.java → ...e/src/main/java/dto/UserListResponse.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: 2 additions & 2 deletions
4
.../web/application/service/UserService.java → ...le/src/main/java/service/UserService.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
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes
File renamed without changes.
File renamed without changes.
File renamed without changes.
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
File renamed without changes.
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
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
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.
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.
RequestHandler의 로거를 생성하는 것은 의도된 내용일까요?