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.
cron 표현식을 코드에 하드코딩하면 스케줄 변경 시 코드를 수정하고 다시 배포해야 하는 번거로움이 있습니다. 운영 환경에서는 유연성이 떨어질 수 있습니다.
이 값을
application.yml과 같은 설정 파일로 분리하는 것을 고려해 보세요.application.yml:그리고
CronJob어노테이션에서 이 값을 참조하도록 합니다.이를 위해서는
QuartzAutoRegisterConfig에서 cron 표현식을 읽을 때 Spring의Environment를 사용하여 프로퍼티 플레이스홀더(${...})를 해석하도록 수정이 필요할 수 있습니다.관련하여, 22행의
examDate와ExamNumberGenerationJobRound1과의 코드 중복도 유사한 방식으로 개선할 수 있습니다. 이렇게 하면 향후 새로운 시험 일정을 추가할 때 더 관리하기 쉬운 구조가 될 것입니다.