Skip to content
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

[BE_5]일괄처리작업 코드 Logger 사용 & ConfigurationProperties를 이용한 ImageProperties url 중앙 관리 #61

Closed
pjhcsols opened this issue Jul 29, 2024 · 1 comment · Fixed by #83
Assignees
Labels
Refactor 코드리팩토링

Comments

@pjhcsols
Copy link
Owner

  1. Logger 사용 통합
    BasiliumServerApplication, UserImageScheduler, UserProfileScheduler 클래스에서 기존의 System.out.println과 System.err.println을 Logger로 대체했습니다. 이렇게 함으로써 로그 메시지를 더 효율적으로 관리하고, 다양한 로그 레벨(INFO, WARN, ERROR 등)을 활용하여 로그 메시지를 구분할 수 있게 되었습니다.

  2. ImageProperties 클래스 추가 및 리팩토링
    ImageProperties 클래스를 만들어 리소스의 상대경로인 image.upload-dir와 image.profile-dir 설정을 관리하고, 애플리케이션 시작 시 해당 경로의 절대 경로를 설정하도록 했습니다. 또한 ImageProperties 초기화 과정에서 설정된 경로를 Logger를 통해 로그로 출력하도록 했습니다.

  3. 스케줄러 클래스 리팩토링
    UserImageScheduler와 UserProfileScheduler 클래스에서 이미지 경로를 ImageProperties에서 가져오도록 변경했습니다. 이를 통해 경로 설정을 중앙 집중화하고 코드의 가독성을 높였습니다.

리팩토링을 통해 코드의 가독성, 유지보수성, 그리고 일관성을 높였습니다. Logger를 사용하여 로그 메시지를 관리하고, ImageProperties를 통해 경로 설정을 중앙에서 관리하도록 했습니다.

@pjhcsols pjhcsols added the Refactor 코드리팩토링 label Jul 29, 2024
@pjhcsols pjhcsols self-assigned this Jul 29, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment