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

Refactor/#555 패키지 구조 변경 및 패키지간 양방향 제거 #556

Open
wants to merge 3 commits into
base: dev
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view

This file was deleted.

This file was deleted.

This file was deleted.

This file was deleted.

This file was deleted.

This file was deleted.

Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
import edonymyeon.backend.consumption.domain.Consumption;
import edonymyeon.backend.consumption.domain.ConsumptionsPerMonth;
import edonymyeon.backend.consumption.repository.ConsumptionRepository;
import edonymyeon.backend.member.application.dto.MemberId;
import edonymyeon.backend.member.profile.application.dto.MemberId;
import java.time.LocalDate;
import java.util.ArrayList;
import java.util.List;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,11 +9,11 @@
import edonymyeon.backend.consumption.domain.Consumption;
import edonymyeon.backend.consumption.repository.ConsumptionRepository;
import edonymyeon.backend.global.exception.EdonymyeonException;
import edonymyeon.backend.member.application.MemberConsumptionService;
import edonymyeon.backend.member.application.dto.MemberId;
import edonymyeon.backend.member.application.dto.YearMonthDto;
import edonymyeon.backend.post.domain.Post;
import edonymyeon.backend.post.repository.PostRepository;
import edonymyeon.backend.member.profile.application.MemberConsumptionService;
import edonymyeon.backend.member.profile.application.dto.MemberId;
import edonymyeon.backend.member.profile.application.dto.YearMonthDto;
import edonymyeon.backend.content.post.domain.Post;
import edonymyeon.backend.content.post.repository.PostRepository;
import lombok.RequiredArgsConstructor;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,9 +5,9 @@

import edonymyeon.backend.consumption.domain.Consumption;
import edonymyeon.backend.consumption.repository.ConsumptionRepository;
import edonymyeon.backend.post.application.PostConsumptionService;
import edonymyeon.backend.post.application.dto.response.PostConsumptionResponse;
import edonymyeon.backend.post.application.event.PostDeletionEvent;
import edonymyeon.backend.content.post.application.PostConsumptionService;
import edonymyeon.backend.content.post.application.dto.response.PostConsumptionResponse;
import edonymyeon.backend.content.post.application.event.PostDeletionEvent;
import java.util.List;
import java.util.Map;
import java.util.function.Function;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@

import edonymyeon.backend.global.domain.TemporalRecord;
import edonymyeon.backend.global.exception.EdonymyeonException;
import edonymyeon.backend.post.domain.Post;
import edonymyeon.backend.content.post.domain.Post;
import jakarta.persistence.Column;
import jakarta.persistence.Entity;
import jakarta.persistence.EnumType;
Expand All @@ -25,8 +25,6 @@
import lombok.EqualsAndHashCode;
import lombok.Getter;
import lombok.NoArgsConstructor;
import org.hibernate.annotations.OnDelete;
import org.hibernate.annotations.OnDeleteAction;

@EqualsAndHashCode(of = {"id"}, callSuper = false)
@Getter
Expand Down
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
package edonymyeon.backend.consumption.ui;

import edonymyeon.backend.auth.annotation.AuthPrincipal;
import edonymyeon.backend.member.auth.annotation.AuthPrincipal;
import edonymyeon.backend.consumption.application.ConsumptionService;
import edonymyeon.backend.consumption.application.dto.RecentConsumptionsResponse;
import edonymyeon.backend.global.version.ApiVersion;
import edonymyeon.backend.member.application.dto.MemberId;
import edonymyeon.backend.member.profile.application.dto.MemberId;
import lombok.RequiredArgsConstructor;
import org.springframework.http.ResponseEntity;
import org.springframework.web.bind.annotation.GetMapping;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
package edonymyeon.backend.cache.application;
package edonymyeon.backend.content.cache.application;

import edonymyeon.backend.cache.application.dto.CachedPostResponse;
import edonymyeon.backend.cache.domain.CachedHotPost;
import edonymyeon.backend.cache.repository.HotPostsRepository;
import edonymyeon.backend.cache.util.HotPostCachePolicy;
import edonymyeon.backend.content.cache.application.dto.CachedPostResponse;
import edonymyeon.backend.content.cache.domain.CachedHotPost;
import edonymyeon.backend.content.cache.repository.HotPostsRepository;
import edonymyeon.backend.content.cache.util.HotPostCachePolicy;
import edonymyeon.backend.global.exception.EdonymyeonException;
import edonymyeon.backend.post.application.HotFindingCondition;
import edonymyeon.backend.post.domain.Post;
import edonymyeon.backend.content.post.application.HotFindingCondition;
import edonymyeon.backend.content.post.domain.Post;
import lombok.RequiredArgsConstructor;
import org.springframework.data.domain.Slice;
import org.springframework.stereotype.Service;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
package edonymyeon.backend.cache.application.dto;
package edonymyeon.backend.content.cache.application.dto;

import java.util.List;

Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
package edonymyeon.backend.cache.domain;
package edonymyeon.backend.content.cache.domain;

import lombok.AllArgsConstructor;
import lombok.Getter;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
package edonymyeon.backend.cache.repository;
package edonymyeon.backend.content.cache.repository;

import edonymyeon.backend.cache.domain.CachedHotPost;
import edonymyeon.backend.content.cache.domain.CachedHotPost;

import java.util.Map;
import java.util.Optional;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
package edonymyeon.backend.cache.util;
package edonymyeon.backend.content.cache.util;

public interface CacheKeyStrategy {

Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
package edonymyeon.backend.cache.util;
package edonymyeon.backend.content.cache.util;

import edonymyeon.backend.post.application.HotFindingCondition;
import edonymyeon.backend.content.post.application.HotFindingCondition;
import lombok.RequiredArgsConstructor;
import org.springframework.stereotype.Component;

Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
package edonymyeon.backend.cache.util;
package edonymyeon.backend.content.cache.util;

import org.springframework.stereotype.Component;

Expand Down
Original file line number Diff line number Diff line change
@@ -1,22 +1,22 @@
package edonymyeon.backend.comment.application;

import edonymyeon.backend.comment.application.dto.request.CommentRequest;
import edonymyeon.backend.comment.application.dto.response.CommentDto;
import edonymyeon.backend.comment.application.dto.response.CommentsResponse;
import edonymyeon.backend.comment.application.event.SavedCommentEvent;
import edonymyeon.backend.comment.domain.Comment;
import edonymyeon.backend.comment.repository.CommentRepository;
package edonymyeon.backend.content.comment.application;

import edonymyeon.backend.content.comment.application.dto.request.CommentRequest;
import edonymyeon.backend.content.comment.application.dto.response.CommentDto;
import edonymyeon.backend.content.comment.application.dto.response.CommentsResponse;
import edonymyeon.backend.content.comment.application.event.SavedCommentEvent;
import edonymyeon.backend.content.comment.domain.Comment;
import edonymyeon.backend.content.comment.repository.CommentRepository;
import edonymyeon.backend.global.exception.EdonymyeonException;
import edonymyeon.backend.global.exception.ExceptionInformation;
import edonymyeon.backend.image.application.ImageService;
import edonymyeon.backend.image.domain.ImageType;
import edonymyeon.backend.image.commentimage.domain.CommentImageInfo;
import edonymyeon.backend.image.commentimage.repository.CommentImageInfoRepository;
import edonymyeon.backend.member.application.dto.MemberId;
import edonymyeon.backend.member.domain.Member;
import edonymyeon.backend.member.repository.MemberRepository;
import edonymyeon.backend.post.domain.Post;
import edonymyeon.backend.post.repository.PostRepository;
import edonymyeon.backend.content.comment.commentimage.domain.CommentImageInfo;
import edonymyeon.backend.content.comment.commentimage.repository.CommentImageInfoRepository;
import edonymyeon.backend.member.profile.application.dto.MemberId;
import edonymyeon.backend.member.profile.domain.Member;
import edonymyeon.backend.member.profile.repository.MemberRepository;
import edonymyeon.backend.content.post.domain.Post;
import edonymyeon.backend.content.post.repository.PostRepository;
import java.util.ArrayList;
import java.util.List;
import lombok.RequiredArgsConstructor;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
package edonymyeon.backend.comment.application;
package edonymyeon.backend.content.comment.application;

import edonymyeon.backend.comment.domain.Comment;
import edonymyeon.backend.comment.repository.CommentRepository;
import edonymyeon.backend.image.commentimage.repository.CommentImageInfoRepository;
import edonymyeon.backend.post.application.PostCommentService;
import edonymyeon.backend.content.comment.domain.Comment;
import edonymyeon.backend.content.comment.repository.CommentRepository;
import edonymyeon.backend.content.comment.commentimage.repository.CommentImageInfoRepository;
import edonymyeon.backend.content.post.application.PostCommentService;
import java.util.ArrayList;
import java.util.List;
import lombok.RequiredArgsConstructor;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
package edonymyeon.backend.comment.application.dto.request;
package edonymyeon.backend.content.comment.application.dto.request;

import org.springframework.web.multipart.MultipartFile;

Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
package edonymyeon.backend.comment.application.dto.response;
package edonymyeon.backend.content.comment.application.dto.response;

import edonymyeon.backend.comment.domain.Comment;
import edonymyeon.backend.content.comment.domain.Comment;
import java.time.LocalDateTime;

public record CommentDto(
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
package edonymyeon.backend.comment.application.dto.response;
package edonymyeon.backend.content.comment.application.dto.response;

import java.util.List;

Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
package edonymyeon.backend.content.comment.application.dto.response;

public record WriterDto(String nickname) {

}
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
package edonymyeon.backend.content.comment.application.event;

import edonymyeon.backend.content.comment.domain.Comment;

public record SavedCommentEvent(Comment comment) {
}
Original file line number Diff line number Diff line change
@@ -1,12 +1,11 @@
package edonymyeon.backend.image.commentimage.domain;
package edonymyeon.backend.content.comment.commentimage.domain;

import edonymyeon.backend.image.domain.ImageInfo;
import jakarta.persistence.Entity;
import lombok.AccessLevel;
import lombok.Getter;
import lombok.NoArgsConstructor;
import org.hibernate.annotations.ColumnDefault;
import org.hibernate.annotations.SQLDelete;
import org.hibernate.annotations.Where;

@Getter
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
package edonymyeon.backend.image.commentimage.repository;
package edonymyeon.backend.content.comment.commentimage.repository;

import edonymyeon.backend.image.commentimage.domain.CommentImageInfo;
import edonymyeon.backend.content.comment.commentimage.domain.CommentImageInfo;
import org.springframework.data.jpa.repository.JpaRepository;
import org.springframework.data.jpa.repository.Modifying;
import org.springframework.data.jpa.repository.Query;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
package edonymyeon.backend.comment.domain;
package edonymyeon.backend.content.comment.domain;

import static edonymyeon.backend.global.exception.ExceptionInformation.COMMENT_MEMBER_NOT_SAME;

import edonymyeon.backend.global.domain.TemporalRecord;
import edonymyeon.backend.global.exception.EdonymyeonException;
import edonymyeon.backend.image.commentimage.domain.CommentImageInfo;
import edonymyeon.backend.member.domain.Member;
import edonymyeon.backend.post.domain.Post;
import edonymyeon.backend.content.comment.commentimage.domain.CommentImageInfo;
import edonymyeon.backend.member.profile.domain.Member;
import edonymyeon.backend.content.post.domain.Post;
import jakarta.persistence.Column;
import jakarta.persistence.Entity;
import jakarta.persistence.FetchType;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
package edonymyeon.backend.comment.repository;
package edonymyeon.backend.content.comment.repository;

import edonymyeon.backend.comment.domain.Comment;
import edonymyeon.backend.content.comment.domain.Comment;
import java.util.List;
import java.util.Optional;
import org.springframework.data.jpa.repository.EntityGraph;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
package edonymyeon.backend.comment.ui;
package edonymyeon.backend.content.comment.ui;

import edonymyeon.backend.auth.annotation.AuthPrincipal;
import edonymyeon.backend.comment.application.CommentService;
import edonymyeon.backend.comment.application.dto.request.CommentRequest;
import edonymyeon.backend.comment.application.dto.response.CommentsResponse;
import edonymyeon.backend.member.auth.annotation.AuthPrincipal;
import edonymyeon.backend.content.comment.application.CommentService;
import edonymyeon.backend.content.comment.application.dto.request.CommentRequest;
import edonymyeon.backend.content.comment.application.dto.response.CommentsResponse;
import edonymyeon.backend.global.version.ApiVersion;
import edonymyeon.backend.member.application.dto.MemberId;
import edonymyeon.backend.member.profile.application.dto.MemberId;
import java.net.URI;
import lombok.RequiredArgsConstructor;
import org.springframework.http.ResponseEntity;
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
package edonymyeon.backend.content.config;

import edonymyeon.backend.content.post.ui.argumentresolver.HotPostSizingArgumentResolver;
import edonymyeon.backend.content.post.ui.argumentresolver.PostPagingArgumentResolver;
import java.util.List;
import lombok.RequiredArgsConstructor;
import org.springframework.context.annotation.Configuration;
import org.springframework.web.method.support.HandlerMethodArgumentResolver;
import org.springframework.web.servlet.config.annotation.WebMvcConfigurer;

@RequiredArgsConstructor
@Configuration
public class WebMvcContentConfiguration implements WebMvcConfigurer {

private final PostPagingArgumentResolver postPagingArgumentResolver;
private final HotPostSizingArgumentResolver hotPostSizingArgumentResolver;

@Override
public void addArgumentResolvers(List<HandlerMethodArgumentResolver> resolvers) {
resolvers.add(postPagingArgumentResolver);
resolvers.add(hotPostSizingArgumentResolver);
}
}
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
package edonymyeon.backend.post.application;
package edonymyeon.backend.content.post.application;

import edonymyeon.backend.content.post.application.dto.SortBy;
import edonymyeon.backend.content.post.application.dto.SortDirection;
import edonymyeon.backend.global.exception.EdonymyeonException;
import edonymyeon.backend.post.application.dto.SortBy;
import edonymyeon.backend.post.application.dto.SortDirection;
import edonymyeon.backend.post.domain.Post;
import edonymyeon.backend.content.post.domain.Post;
import lombok.Builder;
import lombok.Getter;
import org.springframework.data.domain.PageRequest;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
package edonymyeon.backend.post.application;
package edonymyeon.backend.content.post.application;

import edonymyeon.backend.global.exception.EdonymyeonException;
import lombok.Builder;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
package edonymyeon.backend.post.application;
package edonymyeon.backend.content.post.application;

import edonymyeon.backend.content.post.application.dto.response.MyPostResponse;
import edonymyeon.backend.content.post.application.dto.response.PostConsumptionResponse;
import edonymyeon.backend.content.post.repository.PostRepository;
import edonymyeon.backend.image.application.ImageService;
import edonymyeon.backend.image.domain.ImageType;
import edonymyeon.backend.member.application.dto.MemberId;
import edonymyeon.backend.post.application.dto.response.MyPostResponse;
import edonymyeon.backend.post.application.dto.response.PostConsumptionResponse;
import edonymyeon.backend.post.domain.Post;
import edonymyeon.backend.post.repository.PostRepository;
import edonymyeon.backend.member.profile.application.dto.MemberId;
import edonymyeon.backend.content.post.domain.Post;
import java.util.List;
import java.util.Map;
import lombok.RequiredArgsConstructor;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
package edonymyeon.backend.post.application;
package edonymyeon.backend.content.post.application;

public interface PostCommentService {

Expand Down
Loading
Loading