Skip to content

[MAIN] Post Domain 구현 #56

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

Open
6 tasks done
sweetykr7 opened this issue Apr 25, 2025 · 0 comments · May be fixed by #75
Open
6 tasks done

[MAIN] Post Domain 구현 #56

sweetykr7 opened this issue Apr 25, 2025 · 0 comments · May be fixed by #75
Assignees
Labels
in: article Issues in the article module type: feature 새로운 기능 또는 기능적 개선 A new feature or enhancement

Comments

@sweetykr7
Copy link

sweetykr7 commented Apr 25, 2025

이슈 내용

Post 및 DraftPost의 ERD 확인, Domain, Port를 제작합니다.

  • POST ERD 확인하기(Post Table 확인완료, DraftPost Table 추가하였습니다)
  • Domain 제작(Post, DraftPost 제작 완료하였습니다)
  • Port(PostCommandPort, PostQueryPort, DraftPostCommandPort, DraftPostQueryPort 제작 완료하였습니다.)
  • Exception
  • Read-model
  • Adapter

부연 설명

  • Draft Table을 추가하였습니다.

    • 포스트에서 조회수, 공유수, 좋아요수가 제외되었습니다.
    • 상태에서 DRAFT(임시), DONE(완료됨, 포스트 만들어진 상태), DELETED(삭제), PENDING(대기)를 만들었습니다.
    • 포스트 수정시에도 쓸수 있지 않을까 싶어서 포스트 ID를 가지고 있게 만들었는데, 이 부분은 필요없으면 삭제해도 될것 같습니다.
  • Exception을 추가 하였습니다.

    • Post, Draft에 대한 Exception을 추가하였습니다. Board기반으로 작성되었습니다.
  • Read-model을 추가 하였습니다.

    • Post, Draft에 대한 Read-model을 추가하였습니다.
    • Draft는 갯수가 많지 않을 것으로 고려되어 마지막 조회 시간 이후로 가져오는 로직이 아니라, 전체를 가져오는 것으로 만들었습니다.
  • Adapter를 추가하였습니다.

    • Post, Draft에 대한 Driving, Driven Adapter를 추가하였습니다.
    • Hexagonal Project를 기반으로 제작이 되어 있습니다.
  • Service를 추가하였습니다.

    • Post, Draft에 대한 Command, Query Service를 추가하였습니다.
    • Hexagonal Project를 기반으로 제작이 되어 있습니다.

만들면서 발생된 문제들

  • user id를 고려하지 못한 것 같습니다.

    • user 단위로 가져오는 부분도 있을 것 같은데, 그렇지 않으면 모든 post를 긁어와야 해서 데이터 양이 상당해질 것 같습니다.
  • multi-module 관련

    • 특정 부분이 제대로 설정이 되지 않은 것 같습니다. 아래와 같은 에러가 발생합니다.
      Config data resource 'class path resource [post-web.yml]' via location 'post-web.yml' does not exist
    • 아래는 해결하기 위해서 시도했던 사항들입니다.
    • monolith main-runner의 build.gradle.kts에 post를 넣어두었습니다. implementation(project(":post"))
    • monolith main-runner의 resources의 application.yml에 post.yml를 추가하였습니다.
    • services/post/src/main/resources에 post.yml을 추가하였습니다.
    • 각 모듈 :post:webmvc-adapter:post:rdb-adapter의 src/main/resources에 해당하는 yml파일을 추가하였습니다.
@sweetykr7 sweetykr7 added the type: feature 새로운 기능 또는 기능적 개선 A new feature or enhancement label Apr 25, 2025
@sweetykr7 sweetykr7 self-assigned this Apr 25, 2025
@sweetykr7 sweetykr7 changed the title [MAIN] POST Domain 구현 [MAIN] Post Domain 구현 Apr 25, 2025
@merge-simpson merge-simpson added the in: article Issues in the article module label Apr 29, 2025
@sweetykr7 sweetykr7 linked a pull request May 6, 2025 that will close this issue
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
in: article Issues in the article module type: feature 새로운 기능 또는 기능적 개선 A new feature or enhancement
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants