Skip to content

Conversation

@nayonsoso
Copy link
Collaborator

@nayonsoso nayonsoso commented May 16, 2025

작업 내용

지난 회의에서 말씀드렸던, 패키지 재구성에 대한 PR입니다.

특이 사항

❗️커밋의 바디에 설명을 적어뒀으니, 따라가며 읽어주세요❗️

리뷰 요구사항 (선택)

@nayonsoso nayonsoso self-assigned this May 16, 2025
@solid-connection solid-connection deleted a comment from coderabbitai bot May 16, 2025
@nayonsoso nayonsoso force-pushed the refactor/package-arrange branch 2 times, most recently from 9d21b0b to 950a6b9 Compare May 16, 2025 17:38
@solid-connection solid-connection deleted a comment from coderabbitai bot May 16, 2025
@Gyuhyeok99
Copy link
Contributor

고생하셨습니다!! 커밋을 잘 작성해주셔서 읽기 엄청 편하네요!!
궁금한점 몇 가지만 남겨두겠습니다!

  1. 특정 도메인에만 관련된 config들은 그 도메인 안으로 이동하셨는데 redis config는 안옮기신 이유가 따로 있나요? redis 관련 서비스나 RedisConstants는 post로 옮기셨길래 여쭤봐요!

  2. 범용적으로 쓰이는 config 패키지는 그럼 최상위에 있는 것보단 common 안에 있는 게 의미가 더 명확한 거 같은데 어떤가요?

  3. s3 패키지만 다른 패키지와 달리 한 패키지 안에 config, service, dto, controller 등이 있는데 이것도 고쳐야할까요?

@coderabbitai
Copy link

coderabbitai bot commented May 18, 2025

Important

Review skipped

More than 25% of the files skipped due to max files limit. The review is being skipped to prevent a low-quality review.

90 files out of 197 files are above the max files limit of 100. Please upgrade to Pro plan to get higher limits.

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

✨ Finishing Touches
  • 📝 Generate Docstrings

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
Collaborator Author

@nayonsoso nayonsoso left a comment

Choose a reason for hiding this comment

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

항상 꼼꼼히 봐주셔서 감사합니다☺️

특정 도메인에만 관련된 config들은 그 도메인 안으로 이동하셨는데 redis config는 안옮기신 이유가 따로 있나요?

redis는 토큰 저장할 때도 쓰여서 특정 도메인에만 사용되는게 아니기 때문입니다.
특히 아래 코드블럭은 ‘어플리케이션과 레디스의 연결’을 설정하는것이기 때문에, 범용적으로 사용됩니다!

public RedisConfig(@Value("${spring.data.redis.host}") final String redisHost,
                   @Value("${spring.data.redis.port}") final int redisPort) {
    this.redisHost = redisHost;
    this.redisPort = redisPort;
}

redis 관련 서비스나 RedisConstants는 post로 옮기셨길래 여쭤봐요!

RedisService나 RedisConstants는 RedisConfig와 달리 post 하위에서만 사용되고 있어서 옮겼어요~
RedisService 의 increaseViewCount 는 ‘조회수를 증가시키는’ 특정한 역할을 하고 있어요.
RedisConstants는 ‘게시글 조회수의 락 TTL’이 선언되어있고요.

(RedisConstants나 RedisService의 클래스의 이름이 동작을 잘 설명하지 못하는 것 같아요.
리팩터링이 필요하다 생각합니다😅)

범용적으로 쓰이는 config 패키지는 그럼 최상위에 있는 것보단 common 안에 있는 게 의미가 더 명확한 거 같은데 어떤가요?

그게 더 좋겠네요! 반영했습니다. (81142f2)

s3 패키지만 다른 패키지와 달리 한 패키지 안에 config, service, dto, controller 등이 있는데 이것도 고쳐야할까요?

그것도 이번에 바꾸는게 좋겠네요! 반영했습니다. (3c856ac)
짚어주셔서 감사합니다 🙇🏻‍♀️

nayonsoso added 15 commits May 19, 2025 21:33
- BoardCode를 community.board.domain 으로
- PostCategory를 community.post.domain 으로
- RedisConstants 를 community.post.service 로
- LanguageTestType, SemesterAvailableForDispatch, TuitionFeeType을 university.domain 으로
- PreparationStatus, Role을 siteuser.domain 로
- VerifyStatus 을 application.domain 로
- RedisService, UpdateViewCountService 를 post.service 로
- location 패키지 하위에 region 과 country 를 생성
- Region, InterestedRegion 을 location.region.domain 으로
- Country, InterestedCountry 을 location.country.domain 으로
- RegionRepository, InterestedRegionRepository를 location.region.repository 으로
- CountryRepository, InterestedCountyRepository를 location.country.repository 으로
- 테스트 코드는 프로덕션 코드와 대응하는 위치로
- custom.security에 있던 security를 루트 경로로
- 스프링 시큐리티는 서블릿 밖에 존재하므로, 분리된 하나의 관심사라 볼 수 있다.
- 특정 dto 에서만 사용하므로, 그 하위로 옮긴다.
- RejectedReasonRequired, RejectedReasonValidator를 admin.dto.validation 으로
- ValidUniversityChoice, ValidUniversityChoiceValidator를 university.dto.validation 으로
- 여러 도메인에서 쓰이므로 common 하위로
- 관련 도메인 하위에서만 필요한 설정은 그 도메인 하위로 옮긴다.
- AppleOAuthClientProperties, KakaoOAuthClientProperties 를 auth.client.config 로
- CorsProperties, JwtProperties, SecurityConfiguration, AuthenticationManagerConfig 를 security.config 로
- 다른 도메인 패키지들과 마찬가지로, 레이어별로 패키지를 나눈다.
@nayonsoso nayonsoso force-pushed the refactor/package-arrange branch from 3c856ac to 2b16142 Compare May 19, 2025 12:53
@nayonsoso nayonsoso merged commit 0518a77 into solid-connection:develop May 19, 2025
2 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants