Skip to content

Commit

Permalink
refactor: subscribe 패키지를 blog 패키지 내로 이동 (#96)
Browse files Browse the repository at this point in the history
* [#95] refactor: subscribe 패키지를 blog 패키지 내로 이동

* [#95] infra: Repository 커버리지 제외
  • Loading branch information
shin-mallang authored Nov 23, 2023
1 parent 915015a commit d204e92
Show file tree
Hide file tree
Showing 27 changed files with 83 additions and 83 deletions.
4 changes: 2 additions & 2 deletions build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -96,7 +96,7 @@ def excludeCoverage = [
'**/request/**',
'**/response/*Response*',
'**/query/support/*Support*',
'**/domain/*Repository*',
'**/domain/**Repository*',
'**/auth/infrastructure/oauth/*/**',
'**/auth/presentation/OauthController*',
'**/common/domain/CommonDomainModel*',
Expand Down Expand Up @@ -146,7 +146,7 @@ jacocoTestCoverageVerification {
'*.request.*',
'*.response.*Response*',
'*.query.support.*Support',
'*.domain.*Repository',
'*.domain.**Repository',
'*.auth.infrastructure.oauth.*.*',
'*.OauthController',
'*.common.domain.CommonDomainModel*',
Expand Down
Original file line number Diff line number Diff line change
@@ -1,15 +1,15 @@
package com.mallang.subscribe.application;
package com.mallang.blog.application;

import com.mallang.auth.domain.Member;
import com.mallang.auth.domain.MemberRepository;
import com.mallang.blog.application.command.BlogSubscribeCommand;
import com.mallang.blog.application.command.BlogUnsubscribeCommand;
import com.mallang.blog.domain.Blog;
import com.mallang.blog.domain.BlogRepository;
import com.mallang.subscribe.application.command.BlogSubscribeCommand;
import com.mallang.subscribe.application.command.BlogUnsubscribeCommand;
import com.mallang.subscribe.domain.BlogSubscribe;
import com.mallang.subscribe.domain.BlogSubscribeRepository;
import com.mallang.subscribe.domain.BlogSubscribeValidator;
import com.mallang.subscribe.exception.UnsubscribeUnsubscribedBlogException;
import com.mallang.blog.domain.subscribe.BlogSubscribe;
import com.mallang.blog.domain.subscribe.BlogSubscribeRepository;
import com.mallang.blog.domain.subscribe.BlogSubscribeValidator;
import com.mallang.blog.exception.UnsubscribeUnsubscribedBlogException;
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
@@ -1,4 +1,4 @@
package com.mallang.subscribe.application.command;
package com.mallang.blog.application.command;

public record BlogSubscribeCommand(
Long subscriberId,
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
package com.mallang.subscribe.application.command;
package com.mallang.blog.application.command;

public record BlogUnsubscribeCommand(
Long subscriberId,
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
package com.mallang.subscribe.domain;
package com.mallang.blog.domain.subscribe;

import com.mallang.auth.domain.Member;
import com.mallang.blog.domain.Blog;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
package com.mallang.subscribe.domain;
package com.mallang.blog.domain.subscribe;

import com.mallang.auth.domain.Member;
import com.mallang.blog.domain.Blog;
import com.mallang.subscribe.exception.NotFoundBlogSubscribeException;
import com.mallang.blog.exception.NotFoundBlogSubscribeException;
import java.util.Optional;
import org.springframework.data.jpa.repository.JpaRepository;

Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
package com.mallang.subscribe.domain;
package com.mallang.blog.domain.subscribe;

import com.mallang.subscribe.exception.AlreadySubscribedException;
import com.mallang.subscribe.exception.SelfSubscribeException;
import com.mallang.blog.exception.AlreadySubscribedException;
import com.mallang.blog.exception.SelfSubscribeException;
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 com.mallang.subscribe.exception;
package com.mallang.blog.exception;

import com.mallang.common.execption.ErrorCode;
import com.mallang.common.execption.MallangLogException;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
package com.mallang.subscribe.exception;
package com.mallang.blog.exception;

import com.mallang.common.execption.ErrorCode;
import com.mallang.common.execption.MallangLogException;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
package com.mallang.subscribe.exception;
package com.mallang.blog.exception;

import com.mallang.common.execption.ErrorCode;
import com.mallang.common.execption.MallangLogException;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
package com.mallang.subscribe.exception;
package com.mallang.blog.exception;

import com.mallang.common.execption.ErrorCode;
import com.mallang.common.execption.MallangLogException;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,13 +1,13 @@
package com.mallang.subscribe.presentation;
package com.mallang.blog.presentation;

import com.mallang.auth.presentation.support.Auth;
import com.mallang.blog.application.BlogSubscribeService;
import com.mallang.blog.presentation.request.BlogSubscribeRequest;
import com.mallang.blog.presentation.request.BlogUnsubscribeRequest;
import com.mallang.blog.query.BlogSubscribeQueryService;
import com.mallang.blog.query.response.SubscriberResponse;
import com.mallang.blog.query.response.SubscribingBlogResponse;
import com.mallang.common.presentation.PageResponse;
import com.mallang.subscribe.application.BlogSubscribeService;
import com.mallang.subscribe.presentation.request.BlogSubscribeRequest;
import com.mallang.subscribe.presentation.request.BlogUnsubscribeRequest;
import com.mallang.subscribe.query.BlogSubscribeQueryService;
import com.mallang.subscribe.query.response.SubscriberResponse;
import com.mallang.subscribe.query.response.SubscribingBlogResponse;
import java.net.URI;
import lombok.RequiredArgsConstructor;
import org.springframework.data.domain.Pageable;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
package com.mallang.subscribe.presentation.request;
package com.mallang.blog.presentation.request;

import com.mallang.subscribe.application.command.BlogSubscribeCommand;
import com.mallang.blog.application.command.BlogSubscribeCommand;

public record BlogSubscribeRequest(
Long blogId
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
package com.mallang.subscribe.presentation.request;
package com.mallang.blog.presentation.request;

import com.mallang.subscribe.application.command.BlogUnsubscribeCommand;
import com.mallang.blog.application.command.BlogUnsubscribeCommand;

public record BlogUnsubscribeRequest(
Long blogId
Expand Down
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
package com.mallang.subscribe.query;
package com.mallang.blog.query;

import com.mallang.subscribe.query.dao.SubscriberDao;
import com.mallang.subscribe.query.dao.SubscribingBlogDao;
import com.mallang.subscribe.query.response.SubscriberResponse;
import com.mallang.subscribe.query.response.SubscribingBlogResponse;
import com.mallang.blog.query.dao.SubscriberDao;
import com.mallang.blog.query.dao.SubscribingBlogDao;
import com.mallang.blog.query.response.SubscriberResponse;
import com.mallang.blog.query.response.SubscribingBlogResponse;
import lombok.RequiredArgsConstructor;
import org.springframework.data.domain.Page;
import org.springframework.data.domain.Pageable;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
package com.mallang.subscribe.query.dao;
package com.mallang.blog.query.dao;

import static com.mallang.auth.domain.QMember.member;
import static com.mallang.subscribe.domain.QBlogSubscribe.blogSubscribe;
import static com.mallang.blog.domain.subscribe.QBlogSubscribe.blogSubscribe;

import com.mallang.subscribe.domain.BlogSubscribe;
import com.mallang.subscribe.query.response.SubscriberResponse;
import com.mallang.blog.domain.subscribe.BlogSubscribe;
import com.mallang.blog.query.response.SubscriberResponse;
import com.querydsl.jpa.impl.JPAQuery;
import com.querydsl.jpa.impl.JPAQueryFactory;
import java.util.List;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
package com.mallang.subscribe.query.dao;
package com.mallang.blog.query.dao;

import static com.mallang.auth.domain.QMember.member;
import static com.mallang.blog.domain.QBlog.blog;
import static com.mallang.subscribe.domain.QBlogSubscribe.blogSubscribe;
import static com.mallang.blog.domain.subscribe.QBlogSubscribe.blogSubscribe;

import com.mallang.subscribe.domain.BlogSubscribe;
import com.mallang.subscribe.query.response.SubscribingBlogResponse;
import com.mallang.blog.domain.subscribe.BlogSubscribe;
import com.mallang.blog.query.response.SubscribingBlogResponse;
import com.querydsl.jpa.impl.JPAQuery;
import com.querydsl.jpa.impl.JPAQueryFactory;
import java.util.List;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
package com.mallang.subscribe.query.response;
package com.mallang.blog.query.response;

import com.mallang.auth.domain.Member;
import com.mallang.subscribe.domain.BlogSubscribe;
import com.mallang.blog.domain.subscribe.BlogSubscribe;
import java.time.LocalDateTime;
import lombok.Builder;

Expand Down
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
package com.mallang.subscribe.query.response;
package com.mallang.blog.query.response;

import com.mallang.auth.domain.Member;
import com.mallang.blog.domain.Blog;
import com.mallang.subscribe.domain.BlogSubscribe;
import com.mallang.blog.domain.subscribe.BlogSubscribe;
import java.time.LocalDateTime;
import lombok.Builder;

Expand Down
Original file line number Diff line number Diff line change
@@ -1,13 +1,13 @@
package com.mallang.acceptance.subsribe;
package com.mallang.acceptance.blog.subsribe;

import static com.mallang.acceptance.AcceptanceSteps.given;
import static org.assertj.core.api.Assertions.assertThat;

import com.mallang.blog.presentation.request.BlogSubscribeRequest;
import com.mallang.blog.presentation.request.BlogUnsubscribeRequest;
import com.mallang.blog.query.response.SubscriberResponse;
import com.mallang.blog.query.response.SubscribingBlogResponse;
import com.mallang.common.presentation.PageResponse;
import com.mallang.subscribe.presentation.request.BlogSubscribeRequest;
import com.mallang.subscribe.presentation.request.BlogUnsubscribeRequest;
import com.mallang.subscribe.query.response.SubscriberResponse;
import com.mallang.subscribe.query.response.SubscribingBlogResponse;
import io.restassured.common.mapper.TypeRef;
import io.restassured.response.ExtractableResponse;
import io.restassured.response.Response;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
package com.mallang.acceptance.subsribe;
package com.mallang.acceptance.blog.subsribe;

import static com.mallang.acceptance.AcceptanceSteps.본문_없음;
import static com.mallang.acceptance.AcceptanceSteps.생성됨;
Expand All @@ -9,12 +9,12 @@
import static com.mallang.acceptance.auth.MemberAcceptanceSteps.내_정보_조회_요청;
import static com.mallang.acceptance.auth.MemberAcceptanceSteps.회원_정보_조회_결과_데이터;
import static com.mallang.acceptance.blog.BlogAcceptanceSteps.블로그_개설;
import static com.mallang.acceptance.subsribe.BlogSubscribeAcceptanceSteps.구독중인_블로그_조회_결과_검증;
import static com.mallang.acceptance.subsribe.BlogSubscribeAcceptanceSteps.블로그_구독_요청;
import static com.mallang.acceptance.subsribe.BlogSubscribeAcceptanceSteps.블로그_구독_취소_요청;
import static com.mallang.acceptance.subsribe.BlogSubscribeAcceptanceSteps.블로그_구독자_조회_결과_검증;
import static com.mallang.acceptance.subsribe.BlogSubscribeAcceptanceSteps.특정_블로그를_구독중인_구독자_조회_요청;
import static com.mallang.acceptance.subsribe.BlogSubscribeAcceptanceSteps.특정_회원이_구독중인_블로그_조회_요청;
import static com.mallang.acceptance.blog.subsribe.BlogSubscribeAcceptanceSteps.구독중인_블로그_조회_결과_검증;
import static com.mallang.acceptance.blog.subsribe.BlogSubscribeAcceptanceSteps.블로그_구독_요청;
import static com.mallang.acceptance.blog.subsribe.BlogSubscribeAcceptanceSteps.블로그_구독_취소_요청;
import static com.mallang.acceptance.blog.subsribe.BlogSubscribeAcceptanceSteps.블로그_구독자_조회_결과_검증;
import static com.mallang.acceptance.blog.subsribe.BlogSubscribeAcceptanceSteps.특정_블로그를_구독중인_구독자_조회_요청;
import static com.mallang.acceptance.blog.subsribe.BlogSubscribeAcceptanceSteps.특정_회원이_구독중인_블로그_조회_요청;

import com.mallang.acceptance.AcceptanceTest;
import org.junit.jupiter.api.BeforeEach;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,14 +1,14 @@
package com.mallang.subscribe.application;
package com.mallang.blog.application;

import static org.assertj.core.api.Assertions.assertThat;
import static org.assertj.core.api.Assertions.assertThatThrownBy;

import com.mallang.blog.application.command.BlogSubscribeCommand;
import com.mallang.blog.application.command.BlogUnsubscribeCommand;
import com.mallang.blog.exception.AlreadySubscribedException;
import com.mallang.blog.exception.SelfSubscribeException;
import com.mallang.blog.exception.UnsubscribeUnsubscribedBlogException;
import com.mallang.common.ServiceTest;
import com.mallang.subscribe.application.command.BlogSubscribeCommand;
import com.mallang.subscribe.application.command.BlogUnsubscribeCommand;
import com.mallang.subscribe.exception.AlreadySubscribedException;
import com.mallang.subscribe.exception.SelfSubscribeException;
import com.mallang.subscribe.exception.UnsubscribeUnsubscribedBlogException;
import org.junit.jupiter.api.BeforeEach;
import org.junit.jupiter.api.DisplayName;
import org.junit.jupiter.api.DisplayNameGeneration;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
package com.mallang.subscribe.domain;
package com.mallang.blog.domain.subscribe;

import static org.assertj.core.api.Assertions.assertThatThrownBy;
import static org.junit.jupiter.api.Assertions.assertDoesNotThrow;
Expand All @@ -8,8 +8,8 @@
import com.mallang.auth.MemberFixture;
import com.mallang.auth.domain.Member;
import com.mallang.blog.domain.Blog;
import com.mallang.subscribe.exception.AlreadySubscribedException;
import com.mallang.subscribe.exception.SelfSubscribeException;
import com.mallang.blog.exception.AlreadySubscribedException;
import com.mallang.blog.exception.SelfSubscribeException;
import org.junit.jupiter.api.DisplayName;
import org.junit.jupiter.api.DisplayNameGeneration;
import org.junit.jupiter.api.DisplayNameGenerator.ReplaceUnderscores;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
package com.mallang.subscribe.domain;
package com.mallang.blog.domain.subscribe;

import static org.assertj.core.api.Assertions.assertThatThrownBy;
import static org.junit.jupiter.api.Assertions.assertDoesNotThrow;
Expand All @@ -9,8 +9,8 @@
import com.mallang.auth.MemberFixture;
import com.mallang.auth.domain.Member;
import com.mallang.blog.domain.Blog;
import com.mallang.subscribe.exception.AlreadySubscribedException;
import com.mallang.subscribe.exception.SelfSubscribeException;
import com.mallang.blog.exception.AlreadySubscribedException;
import com.mallang.blog.exception.SelfSubscribeException;
import org.junit.jupiter.api.DisplayName;
import org.junit.jupiter.api.DisplayNameGeneration;
import org.junit.jupiter.api.DisplayNameGenerator.ReplaceUnderscores;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
package com.mallang.subscribe.query.dao;
package com.mallang.blog.query.dao;

import static org.assertj.core.api.Assertions.assertThat;

import com.mallang.blog.application.command.BlogSubscribeCommand;
import com.mallang.blog.query.response.SubscriberResponse;
import com.mallang.common.ServiceTest;
import com.mallang.subscribe.application.command.BlogSubscribeCommand;
import com.mallang.subscribe.query.response.SubscriberResponse;
import java.util.List;
import org.junit.jupiter.api.DisplayName;
import org.junit.jupiter.api.DisplayNameGeneration;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
package com.mallang.subscribe.query.dao;
package com.mallang.blog.query.dao;

import static org.assertj.core.api.Assertions.assertThat;

import com.mallang.blog.application.command.BlogSubscribeCommand;
import com.mallang.blog.query.response.SubscribingBlogResponse;
import com.mallang.common.ServiceTest;
import com.mallang.subscribe.application.command.BlogSubscribeCommand;
import com.mallang.subscribe.query.response.SubscribingBlogResponse;
import java.util.List;
import org.junit.jupiter.api.DisplayName;
import org.junit.jupiter.api.DisplayNameGeneration;
Expand Down
8 changes: 4 additions & 4 deletions src/test/java/com/mallang/common/ServiceTest.java
Original file line number Diff line number Diff line change
Expand Up @@ -9,9 +9,13 @@
import com.mallang.auth.query.dao.MemberDao;
import com.mallang.blog.application.AboutService;
import com.mallang.blog.application.BlogService;
import com.mallang.blog.application.BlogSubscribeService;
import com.mallang.blog.application.command.OpenBlogCommand;
import com.mallang.blog.domain.AboutRepository;
import com.mallang.blog.domain.BlogRepository;
import com.mallang.blog.domain.subscribe.BlogSubscribeRepository;
import com.mallang.blog.query.dao.SubscriberDao;
import com.mallang.blog.query.dao.SubscribingBlogDao;
import com.mallang.category.application.CategoryService;
import com.mallang.category.domain.CategoryRepository;
import com.mallang.category.query.CategoryQueryService;
Expand Down Expand Up @@ -39,10 +43,6 @@
import com.mallang.post.query.PostQueryService;
import com.mallang.post.query.PostStarQueryService;
import com.mallang.post.query.dao.PostSearchDao;
import com.mallang.subscribe.application.BlogSubscribeService;
import com.mallang.subscribe.domain.BlogSubscribeRepository;
import com.mallang.subscribe.query.dao.SubscriberDao;
import com.mallang.subscribe.query.dao.SubscribingBlogDao;
import java.util.Arrays;
import java.util.Collections;
import java.util.List;
Expand Down

0 comments on commit d204e92

Please sign in to comment.