forked from softeerbootcamp-7th/be-was
-
Notifications
You must be signed in to change notification settings - Fork 0
[ALL] 프로젝트 패키지 구조 변경 #27
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
Merged
Merged
Changes from all commits
Commits
Show all changes
8 commits
Select commit
Hold shift + click to select a range
9b8e68d
refactor(web): PostHandler 파일 읽기 관련 로직 최적화
codingbaraGo e1ea87b
Chore: 메서드 라인 변경
codingbaraGo 577acc7
refactor(app): 유저 어플리케이션 관련 패키지 구축
codingbaraGo 9e9b479
refactor(config): 서버 구동 설정 관련 패키지 구축
codingbaraGo 319ded6
refactor(http): HTTP 관련 패키지 분리
codingbaraGo 72bf62f
refactor(web): 주요 클래스 명 변경
codingbaraGo 0176b22
refactor(web, exception): Web 패키지 구조 변경
codingbaraGo 4775573
refactor(config): 변경된 클래스 명 반영
codingbaraGo 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
4 changes: 2 additions & 2 deletions
4
src/main/java/db/Database.java → src/main/java/app/db/Database.java
This file contains hidden or 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: 7 additions & 7 deletions
14
...n/java/webserver/RegisterHandlerImpl.java → ...java/app/handler/RegisterHandlerImpl.java
This file contains hidden or 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/model/User.java → src/main/java/app/model/User.java
This file contains hidden or 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 model; | ||
| package app.model; | ||
|
|
||
| public class User { | ||
| private String userId; | ||
|
|
||
This file contains hidden or 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 hidden or 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: 7 additions & 7 deletions
14
...ain/java/dependency/DependencyLoader.java → src/main/java/config/DependencyLoader.java
This file contains hidden or 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,23 +1,23 @@ | ||
| package dependency; | ||
| package config; | ||
|
|
||
| import webserver.exception.ExceptionHandlerMapping; | ||
| import webserver.http.request.HttpRequestConverter; | ||
| import webserver.http.response.HttpResponseConverter; | ||
| import webserver.web.WasServlet; | ||
| import exception.ExceptionHandlerMapping; | ||
| import http.request.HttpRequestConverter; | ||
| import http.response.HttpResponseConverter; | ||
| import web.dispatch.Dispatcher; | ||
|
|
||
| public class DependencyLoader { | ||
| private final AppConfig appConfig; | ||
|
|
||
| public final HttpRequestConverter httpRequestConverter; | ||
| public final HttpResponseConverter httpResponseConverter; | ||
| public final ExceptionHandlerMapping exceptionHandlerMapping; | ||
| public final WasServlet wasServlet; | ||
| public final Dispatcher dispatcher; | ||
|
|
||
| public DependencyLoader(){ | ||
| this.appConfig = new AppConfig(); | ||
| this.httpRequestConverter = appConfig.httpRequestConverter(); | ||
| this.httpResponseConverter = appConfig.httpResponseConverter(); | ||
| this.exceptionHandlerMapping = appConfig.exceptionHandlerMapping(); | ||
| this.wasServlet = appConfig.wasServlet(); | ||
| this.dispatcher = appConfig.dispatcher(); | ||
| } | ||
| } |
This file contains hidden or 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,9 @@ | ||
| package config; | ||
|
|
||
| import java.util.List; | ||
|
|
||
| public class VariableConfig { | ||
| public static final List<String> STATIC_RESOURCE_ROOTS = List.of( | ||
| "./src/main/resources", | ||
| "./src/main/resources/static"); | ||
| } | ||
4 changes: 2 additions & 2 deletions
4
...n/java/webserver/exception/ErrorCode.java → src/main/java/exception/ErrorCode.java
This file contains hidden or 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
...a/webserver/exception/ErrorException.java → src/main/java/exception/ErrorException.java
This file contains hidden or 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
...webserver/exception/ExceptionHandler.java → ...main/java/exception/ExceptionHandler.java
This file contains hidden or 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 webserver.exception; | ||
| package exception; | ||
|
|
||
| import java.net.Socket; | ||
|
|
||
|
|
||
2 changes: 1 addition & 1 deletion
2
...er/exception/ExceptionHandlerMapping.java → ...va/exception/ExceptionHandlerMapping.java
This file contains hidden or 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 webserver.exception; | ||
| package exception; | ||
|
|
||
| import java.net.Socket; | ||
| import java.util.List; | ||
|
|
||
2 changes: 1 addition & 1 deletion
2
...webserver/exception/ServiceException.java → ...main/java/exception/ServiceException.java
This file contains hidden or 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
10 changes: 5 additions & 5 deletions
10
...eption/handler/ErrorExceptionHandler.java → ...eption/handler/ErrorExceptionHandler.java
This file contains hidden or 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
12 changes: 5 additions & 7 deletions
12
...tion/handler/ServiceExceptionHandler.java → ...tion/handler/ServiceExceptionHandler.java
This file contains hidden or 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
...eption/handler/UnhandledErrorHandler.java → ...eption/handler/UnhandledErrorHandler.java
This file contains hidden or 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/webserver/http/HttpMethod.java → src/main/java/http/HttpMethod.java
This file contains hidden or 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 webserver.http; | ||
| package http; | ||
|
|
||
| public enum HttpMethod { | ||
| GET, | ||
|
|
||
2 changes: 1 addition & 1 deletion
2
src/main/java/webserver/http/HttpStatus.java → src/main/java/http/HttpStatus.java
This file contains hidden or 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 webserver.http; | ||
| package http; | ||
|
|
||
| public enum HttpStatus { | ||
| OK(200), | ||
|
|
||
2 changes: 1 addition & 1 deletion
2
...t/HttpBufferedReaderRequestConverter.java → ...t/HttpBufferedReaderRequestConverter.java
This file contains hidden or 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 webserver.http.request; | ||
| package http.request; | ||
|
|
||
| import org.slf4j.Logger; | ||
| import org.slf4j.LoggerFactory; | ||
|
|
||
10 changes: 5 additions & 5 deletions
10
...a/webserver/http/request/HttpRequest.java → src/main/java/http/request/HttpRequest.java
This file contains hidden or 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
...er/http/request/HttpRequestConverter.java → ...va/http/request/HttpRequestConverter.java
This file contains hidden or 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 webserver.http.request; | ||
| package http.request; | ||
|
|
||
| import java.net.Socket; | ||
|
|
||
|
|
||
2 changes: 1 addition & 1 deletion
2
.../HttpBufferedStreamResponseConverter.java → .../HttpBufferedStreamResponseConverter.java
This file contains hidden or 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 hidden or 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
.../http/response/HttpResponseConverter.java → .../http/response/HttpResponseConverter.java
This file contains hidden or 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 webserver.http.response; | ||
| package http.response; | ||
|
|
||
| import java.net.Socket; | ||
|
|
||
|
|
||
This file contains hidden or 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.
정적 리소스 경로가 하드코딩되어 있습니다. 프로덕션 환경에서는 배포 구조에 따라 경로가 달라질 수 있으므로, 환경 변수나 설정 파일에서 읽도록 개선하는 것이 좋습니다. 또한 './src/main/resources'는 개발 환경 전용 경로로 보이므로, 런타임 환경에서 올바른 리소스 경로를 동적으로 결정하는 로직이 필요합니다."