Skip to content

[UPLUS-144] feat: 스케줄러 작동 시 invMonth 자동 주입#12

Merged
arkchive merged 3 commits into
developfrom
feat/UPLUS-144
Jan 26, 2026
Merged

[UPLUS-144] feat: 스케줄러 작동 시 invMonth 자동 주입#12
arkchive merged 3 commits into
developfrom
feat/UPLUS-144

Conversation

@arkchive
Copy link
Copy Markdown
Contributor

🎫 지라 티켓

UPLUS-144


✅ 작업 사항


📋 체크리스트

  • 코드가 정상적으로 빌드됩니다.
  • 관련 테스트 코드를 작성했습니다.
  • 기존 테스트가 모두 통과합니다.
  • 코드 스타일(Spotless, Checkstyle)을 준수합니다.

⌨ 기타

@github-actions github-actions Bot added size/S PR size: S feat 새로운 기능 labels Jan 26, 2026
@github-actions github-actions Bot requested a review from k0081915 January 26, 2026 01:33
@gemini-code-assist
Copy link
Copy Markdown

Summary of Changes

Hello @arkchive, I'm Gemini Code Assist1! I'm currently reviewing this pull request and will post my feedback shortly. In the meantime, here's a summary to help you and other reviewers quickly get up to speed!

이 PR은 배치 스케줄러의 실행 안정성과 편의성을 향상시키는 데 중점을 둡니다. 'invMonth' 매개변수에 대한 기본값을 제공하여 스케줄러 실행 시 유연성을 높이고, 애플리케이션의 실행 타입을 명확히 설정하여 배치 환경에 최적화했습니다.

Highlights

  • invMonth 매개변수 자동 주입: 스케줄러 실행 시 'invMonth' 매개변수가 제공되지 않으면 현재 년월(yyyyMM)을 기본값으로 자동 주입하도록 변경되었습니다.
  • 웹 애플리케이션 타입 설정: 'application.yml'에 'spring.main.web-application-type: none'을 추가하여 애플리케이션이 웹 환경 없이 배치 작업으로 실행되도록 명시했습니다.
  • 매개변수 처리 로직 개선: 'jobName' 및 'invMonth' 매개변수를 'Optional'을 사용하여 더욱 안전하게 처리하도록 로직을 개선했습니다.

🧠 New Feature in Public Preview: You can now enable Memory to help Gemini Code Assist learn from your team's feedback. This makes future code reviews more consistent and personalized to your project's style. Click here to enable Memory in your admin console.

Using Gemini Code Assist

The full guide for Gemini Code Assist can be found on our documentation page, here are some quick tips.

Invoking Gemini

You can request assistance from Gemini at any point by creating a comment using either /gemini <command> or @gemini-code-assist <command>. Below is a summary of the supported commands on the current page.

Feature Command Description
Code Review /gemini review Performs a code review for the current pull request in its current state.
Pull Request Summary /gemini summary Provides a summary of the current pull request in its current state.
Comment @gemini-code-assist Responds in comments when explicitly tagged, both in pull request comments and review comments.
Help /gemini help Displays a list of available commands.

Customization

To customize Gemini Code Assist for GitHub experience, repository maintainers can create a configuration file and/or provide a custom code review style guide (such as PEP-8 for Python) by creating and adding files to a .gemini/ folder in the base of the repository. Detailed instructions can be found here.

Limitations & Feedback

Gemini Code Assist may make mistakes. Please leave feedback on any instances where its feedback is incorrect or counter productive. You can react with 👍 and 👎 on @gemini-code-assist comments. If you're interested in giving your feedback about your experience with Gemini Code Assist for Github and other Google products, sign up here.

You can also get AI-powered code generation, chat, as well as code reviews directly in the IDE at no cost with the Gemini Code Assist IDE Extension.

Footnotes

  1. Review the Privacy Notices, Generative AI Prohibited Use Policy, Terms of Service, and learn how to configure Gemini Code Assist in GitHub here. Gemini can make mistakes, so double check it and use code with caution.

Copy link
Copy Markdown

@gemini-code-assist gemini-code-assist Bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Code Review

이번 PR은 스케줄러를 통해 배치 잡을 실행할 때 invMonth 파라미터가 없는 경우, 현재 년월을 자동으로 주입하도록 개선하는 내용을 담고 있습니다. Optional을 사용하여 파라미터 부재 시 NullPointerException이 발생할 수 있는 가능성을 제거하고, 기본값을 제공하는 방식은 좋은 접근입니다. 또한, 배치 애플리케이션에 맞게 web-application-typenone으로 설정하여 불필요한 웹 서버가 실행되지 않도록 한 점도 올바른 변경입니다. 코드 리뷰에서는 DateTimeFormatter를 매번 생성하는 대신 상수로 만들어 재사용하여 성능을 개선하는 방안을 제안했습니다.

Comment on lines +47 to +48
LocalDate.now()
.format(DateTimeFormatter.ofPattern("yyyyMM")));
Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

medium

DateTimeFormatter 객체는 불변(immutable)이고 스레드에 안전(thread-safe)합니다. 따라서 매번 ofPattern()을 호출하여 새로 생성하는 것보다 static final 상수로 선언하여 재사용하는 것이 성능에 더 유리합니다. 클래스 수준에서 상수로 정의하여 사용하는 것을 권장합니다.

예시:

// BatchJobRunner.java 클래스에 상수 추가
private static final DateTimeFormatter YYYYMM_FORMATTER = DateTimeFormatter.ofPattern("yyyyMM");

// ... run() 메서드 내부에서 사용
.format(YYYYMM_FORMATTER)

@github-actions
Copy link
Copy Markdown

SonarQube Quality Summary (Community)

Quality Gate PASSED

Branch: feat/UPLUS-144
Compared to: default branch

Issues

  • 🐞 Bugs: 0
  • 🔐 Vulnerabilities: 2
  • 📎 Code Smells: 46

Measures

  • Coverage: 0%
  • Duplication: 0%

🔗 Dashboard: https://sonarqube.swthewhite.store/dashboard?id=batch-core&branch=feat/UPLUS-144

Generated automatically by GitHub Actions.

@github-actions
Copy link
Copy Markdown

SonarQube Quality Summary (Community)

Quality Gate FAILED

Branch: feat/UPLUS-144
Compared to: default branch

Issues

  • 🐞 Bugs: 0
  • 🔐 Vulnerabilities: 2
  • 📎 Code Smells: 48

Measures

  • Coverage: 0%
  • Duplication: 0%

🔗 Dashboard: https://sonarqube.swthewhite.store/dashboard?id=batch-core&branch=feat/UPLUS-144

Generated automatically by GitHub Actions.

Copy link
Copy Markdown
Contributor

@swthewhite swthewhite left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

고생하셨습니다

@arkchive arkchive merged commit 5cafbd9 into develop Jan 26, 2026
8 of 9 checks passed
@swthewhite swthewhite deleted the feat/UPLUS-144 branch January 26, 2026 02:36
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

feat 새로운 기능 size/S PR size: S

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants