-
Notifications
You must be signed in to change notification settings - Fork 34
yuni.jeong BE 사전과제 #16
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
Open
hyoon1129
wants to merge
26
commits into
ej31:main
Choose a base branch
from
hyoon1129:feature
base: main
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
Conversation
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
- Company.java - StocksHistory.java - StocksHistoryId.java (복합 키 사용을 위해)
- GlobalExceptionHandler에서 파라미터 누락을 처리 - StockController에서 수동으로 파라미터를 검증하던 로직 제거
- DateTimeParseException : 잘못된 날짜 형식 입력 예외 처리 - CompanyNotFoundException : 존재하지 않는 회사 코드 조회 예외 처리
- startDate가 endDate보다 이전이어야 한다.
- API 키 검증 로직을 validateApiKey() 메서드로 분리 - HTTP 상태 코드 하드코딩 제거
- validateApiKey() 메서드에 null 체크 로직 추가
- InvalidApiKeyException 클래스 작성 - GlobalExceptionHandler에 InvalidApiKeyException 전용 핸들러 추가
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
📍 주요 기능
📍 API 응답 설계
ApiResponse<T>사용.GlobalExceptionHandler에서 HTTP 상태별 일관된 JSON 포맷 반환API_DOCS.md에서 상세 내용 확인할 수 있습니다!📍 유효성 검사
📍 테스트 코드 작성
StockServiceTest를 통해 주식 데이터 조회 로직 검증StockExceptionTest로 주요 예외 상황에 대한 응답 코드 및 메시지 확인📍 로그 정책
logback-spring.xmlSizeAndTimeBasedRollingPolicy정책 설정📍 배포 전략
GitHub Actions+Docker+EC2GHCR📍 라이브러리 선택 이유
lombok: 반복적이고 복잡한 코드를 간소화하기 위해spring-boot-starter-validation: API 요청 시 날짜 및 필수 파라미터의 유효성을 검증하기 위해mysql-connector-j: MySQL 데이터베이스와 연결하여 주식 데이터를 조회하기 위해h2database: 테스트 환경에서 메모리 데이터베이스를 사용하여 빠르고 독립적인 테스트를 위해junit-platform-launcher: 서비스 로직과 예외 처리 기능을 검증하는 테스트 코드 실행을 위해📍 애로사항/아쉬운 점