Skip to content

Conversation

@AYEOOON
Copy link
Member

@AYEOOON AYEOOON commented Jul 7, 2025

📝 작업 내용

  • Azure SQL 관련 설정 컬럼 제거

    • 더 이상 사용하지 않는 Azure SQL 설정을 정리
  • application.properties 파일 내 민감 정보 분리

    • application.properties에서 client-id, datasource, mail, cloudinary 등 민감한 환경 변수들을 ${...} 형태로 대체

🛠️ PR 유형

어떤 변경 사항이 있나요?

  • 새로운 기능 추가
  • 버그 수정
  • CSS 등 사용자 UI 디자인 변경
  • 코드에 영향을 주지 않는 변경사항(오타 수정, 탭 사이즈 변경, 변수명 변경)
  • 코드 리팩토링
  • 주석 추가 및 수정
  • 문서 수정
  • 테스트 추가, 테스트 리팩토링
  • 빌드 부분 혹은 패키지 매니저 수정
  • 파일 혹은 폴더명 수정
  • 파일 혹은 폴더 삭제

📸스크린샷 (선택)

💬 공유사항 to 리뷰어

✅ PR Checklist

PR이 다음 요구 사항을 충족하는지 확인하세요.

  • 커밋 메시지 컨벤션에 맞게 작성했습니다.
  • 변경 사항에 대한 테스트를 했습니다.(버그 수정/기능에 대한 테스트).

Summary by CodeRabbit

  • Chores

    • Updated environment and configuration file handling to improve management of sensitive information and environment-specific settings.
    • Adjusted tracking of configuration files to ensure proper version control and security practices.
  • Refactor

    • Modified database column annotations for improved compatibility and maintainability.

@coderabbitai
Copy link

coderabbitai bot commented Jul 7, 2025

Important

Review skipped

Review was skipped as selected files did not have any reviewable changes.

💤 Files selected but had no reviewable changes (1)
  • gradlew

You can disable this status message by setting the reviews.review_status to false in the CodeRabbit configuration file.

Walkthrough

The changes update the .gitignore to track certain property files and ignore the .env file, remove an explicit JPA column definition from the Diary entity's title field, and introduce a comprehensive application.properties file configuring OAuth, database, JWT, Redis, SMTP, Thymeleaf, and Cloudinary settings for a Spring Boot application.

Changes

File(s) Change Summary
.gitignore Removed application.properties and application-test.properties from ignore; added /.env to ignore list.
src/main/java/com/project/Haru_Mail/domain/diary/Diary.java Removed explicit JPA column type annotation for title field.
src/main/resources/application.properties Added new configuration file with environment-based properties for app, DB, OAuth, JWT, Redis, SMTP, etc.

Sequence Diagram(s)

sequenceDiagram
    participant User
    participant SpringBootApp
    participant GoogleOAuth
    participant Database
    participant Redis
    participant GmailSMTP
    participant Cloudinary

    User->>SpringBootApp: Initiate request (login, API, etc.)
    SpringBootApp->>GoogleOAuth: OAuth2 authentication (client ID, secret)
    GoogleOAuth-->>SpringBootApp: Auth code/token
    SpringBootApp->>Database: Connect using datasource properties
    SpringBootApp->>Redis: Connect using Redis properties
    SpringBootApp->>GmailSMTP: Send email via SMTP config
    SpringBootApp->>Cloudinary: Upload media using API credentials
    SpringBootApp-->>User: Respond with result
Loading

Possibly related PRs

Poem

In the warren of code, a change takes root,
Properties now tracked, no longer mute.
The diary’s title, free from type constraint,
Configs abound—no room for complaint!
With secrets safe and flows anew,
The project hops on, fresh as dew.
🐇✨


Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share
🪧 Tips

Chat

There are 3 ways to chat with CodeRabbit:

  • Review comments: Directly reply to a review comment made by CodeRabbit. Example:
    • I pushed a fix in commit <commit_id>, please review it.
    • Explain this complex logic.
    • Open a follow-up GitHub issue for this discussion.
  • Files and specific lines of code (under the "Files changed" tab): Tag @coderabbitai in a new review comment at the desired location with your query. Examples:
    • @coderabbitai explain this code block.
    • @coderabbitai modularize this function.
  • PR comments: Tag @coderabbitai in a new PR comment to ask questions about the PR branch. For the best results, please provide a very specific query, as very limited context is provided in this mode. Examples:
    • @coderabbitai gather interesting stats about this repository and render them as a table. Additionally, render a pie chart showing the language distribution in the codebase.
    • @coderabbitai read src/utils.ts and explain its main purpose.
    • @coderabbitai read the files in the src/scheduler package and generate a class diagram using mermaid and a README in the markdown format.
    • @coderabbitai help me debug CodeRabbit configuration file.

Support

Need help? Create a ticket on our support page for assistance with any issues or questions.

Note: Be mindful of the bot's finite context window. It's strongly recommended to break down tasks such as reading entire modules into smaller chunks. For a focused discussion, use review comments to chat about specific files and their changes, instead of using the PR comments.

CodeRabbit Commands (Invoked using PR comments)

  • @coderabbitai pause to pause the reviews on a PR.
  • @coderabbitai resume to resume the paused reviews.
  • @coderabbitai review to trigger an incremental review. This is useful when automatic reviews are disabled for the repository.
  • @coderabbitai full review to do a full review from scratch and review all the files again.
  • @coderabbitai summary to regenerate the summary of the PR.
  • @coderabbitai generate docstrings to generate docstrings for this PR.
  • @coderabbitai generate sequence diagram to generate a sequence diagram of the changes in this PR.
  • @coderabbitai resolve resolve all the CodeRabbit review comments.
  • @coderabbitai configuration to show the current CodeRabbit configuration for the repository.
  • @coderabbitai help to get help.

Other keywords and placeholders

  • Add @coderabbitai ignore anywhere in the PR description to prevent this PR from being reviewed.
  • Add @coderabbitai summary to generate the high-level summary at a specific location in the PR description.
  • Add @coderabbitai anywhere in the PR title to generate the title automatically.

CodeRabbit Configuration File (.coderabbit.yaml)

  • You can programmatically configure CodeRabbit by adding a .coderabbit.yaml file to the root of your repository.
  • Please see the configuration documentation for more information.
  • If your editor has YAML language server enabled, you can add the path at the top of this file to enable auto-completion and validation: # yaml-language-server: $schema=https://coderabbit.ai/integrations/schema.v2.json

Documentation and Community

  • Visit our Documentation for detailed information on how to use CodeRabbit.
  • Join our Discord Community to get help, request features, and share feedback.
  • Follow us on X/Twitter for updates and announcements.

Copy link

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

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

Actionable comments posted: 1

🧹 Nitpick comments (3)
.gitignore (1)

36-39: Sensitive-config workflow is now tracked – double-check review gates.

application.properties is no longer ignored, so future commits risk leaking hard-coded secrets if a developer forgets to keep placeholders.
Make sure the repository has:

  1. A pre-commit or CI secret-scanner (e.g., GitGuardian, Trufflehog).
  2. A CODEOWNERS rule forcing at least one security reviewer on any change to application.properties.

Without these gates, it’s easy to regress and push live credentials.

src/main/resources/application.properties (2)

10-16: Duplicate/invalid Hibernate charset property.

spring.jpa.properties.hibernate.connection.charSet is not a recognised Hibernate setting and is redundant because …characterEncoding=UTF-8 is already declared on L15.
Drop L13 to avoid confusion.

- spring.jpa.properties.hibernate.connection.charSet=UTF-8

42-44: Expose fewer hard-coded vendor identifiers.

Although Cloudinary’s cloud-name is not secret, externalising it keeps environments symmetric and avoids accidental drift.

-cloudinary.cloud-name=dr6jccdxm
+cloudinary.cloud-name=${CLOUDINARY_CLOUD_NAME}
📜 Review details

Configuration used: CodeRabbit UI
Review profile: CHILL
Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between c3016fd and e9c0ded.

📒 Files selected for processing (3)
  • .gitignore (1 hunks)
  • src/main/java/com/project/Haru_Mail/domain/diary/Diary.java (0 hunks)
  • src/main/resources/application.properties (1 hunks)
💤 Files with no reviewable changes (1)
  • src/main/java/com/project/Haru_Mail/domain/diary/Diary.java
🔇 Additional comments (2)
src/main/resources/application.properties (2)

17-22: Custom JWT keys: verify they match code constants.

jwt.* keys are application-specific. Ensure the code actually reads these exact property names; Spring won’t map them automatically.


28-35: Same whitespace issue for SMTP properties.

Remove spaces before = to ensure keys bind correctly.

-spring.mail.host = smtp.gmail.com
-spring.mail.port = 587
-spring.mail.username=${MAIL_USERNAME}
-spring.mail.password=${MAIL_PASSWORD}
-spring.mail.properties.mail.smtp.auth = true
-spring.mail.properties.mail.smtp.starttls.enable = true
-spring.mail.properties.mail.smtp.ssl.trust=smtp.gmail.com
+spring.mail.host=smtp.gmail.com
+spring.mail.port=587
+spring.mail.username=${MAIL_USERNAME}
+spring.mail.password=${MAIL_PASSWORD}
+spring.mail.properties.mail.smtp.auth=true
+spring.mail.properties.mail.smtp.starttls.enable=true
+spring.mail.properties.mail.smtp.ssl.trust=smtp.gmail.com

Likely an incorrect or invalid review comment.

Comment on lines +23 to +27
spring.redis.host = localhost
spring.redis.port = 6379
spring.redis.password=${REDIS_PASSWORD}
spring.redis.timeout = 6000

Copy link

Choose a reason for hiding this comment

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

🛠️ Refactor suggestion

Whitespace breaks property keys & hard-coded local Redis host.

Trailing spaces before = become part of the key, so Spring will fail to bind.
Also, hard-coding localhost defeats containerised / cloud deploys; prefer an env placeholder.

- spring.redis.host = localhost
- spring.redis.port = 6379
- spring.redis.password=${REDIS_PASSWORD}
- spring.redis.timeout = 6000
+spring.redis.host=${REDIS_HOST:localhost}
+spring.redis.port=${REDIS_PORT:6379}
+spring.redis.password=${REDIS_PASSWORD}
+spring.redis.timeout=${REDIS_TIMEOUT:6000}
📝 Committable suggestion

‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.

Suggested change
spring.redis.host = localhost
spring.redis.port = 6379
spring.redis.password=${REDIS_PASSWORD}
spring.redis.timeout = 6000
spring.redis.host=${REDIS_HOST:localhost}
spring.redis.port=${REDIS_PORT:6379}
spring.redis.password=${REDIS_PASSWORD}
spring.redis.timeout=${REDIS_TIMEOUT:6000}
🤖 Prompt for AI Agents
In src/main/resources/application.properties around lines 23 to 27, remove any
trailing spaces before the '=' in the Redis property keys to ensure Spring can
bind them correctly. Replace the hard-coded 'localhost' value for
spring.redis.host with an environment variable placeholder like ${REDIS_HOST} to
support containerized and cloud deployments.

@AYEOOON AYEOOON merged commit b8533c8 into Haru-Mail:main Jul 7, 2025
2 of 3 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant