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

[레거시 코드 리팩터링 - 4단계] 제이미(임정수) 미션 제출합니다 #805

Merged
merged 4 commits into from
Oct 29, 2023
Merged
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
12 changes: 12 additions & 0 deletions app/build.gradle
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
bootJar { enabled = false }
jar { enabled = true }
Comment on lines +1 to +2
Copy link

Choose a reason for hiding this comment

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

루트 gradle에도 이 코드가 있었으면 좋았겠네용


dependencies {
implementation project(':core')
implementation project(':domain-menu')
implementation project(':domain-menugroup')
implementation project(':domain-order')
implementation project(':domain-ordertable')
implementation project(':domain-product')
implementation project(':domain-tablegroup')
}
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,7 @@ class MenuRepositoryTest {

@Autowired
private MenuGroupRepository menuGroupRepository;

@Autowired
private ProductRepository productRepository;

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,6 @@

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


@DisplayNameGeneration(DisplayNameGenerator.ReplaceUnderscores.class)
@SuppressWarnings("NonAsciiCharacters")
@DisplayName("메뉴 그룹 서비스 테스트")
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
import kitchenpos.menu.repository.MenuRepository;
import kitchenpos.menugroup.domain.MenuGroup;
import kitchenpos.menugroup.repository.MenuGroupRepository;
import kitchenpos.menugroup.ui.dto.ChangeOrderTableEmptyRequest;
import kitchenpos.ordertable.ui.dto.ChangeOrderTableEmptyRequest;
import kitchenpos.order.repository.OrderRepository;
import kitchenpos.ordertable.domain.OrderTable;
import kitchenpos.ordertable.repository.OrderTableRepository;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
package kitchenpos.tablegroup.application;
package kitchenpos.tablegroup;

import kitchenpos.config.ServiceTestConfig;
import kitchenpos.exception.InvalidOrderTableToTableGroup;
Expand All @@ -21,6 +21,7 @@
import kitchenpos.ordertable.repository.OrderTableRepository;
import kitchenpos.product.domain.Product;
import kitchenpos.product.repository.ProductRepository;
import kitchenpos.tablegroup.application.TableGroupService;
import kitchenpos.tablegroup.domain.TableGroup;
import kitchenpos.tablegroup.repository.TableGroupRepository;
import kitchenpos.tablegroup.ui.dto.TableGroupRequest;
Expand Down
38 changes: 22 additions & 16 deletions build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -4,23 +4,29 @@ plugins {
id 'java'
}

group = 'camp.nextstep.edu'
version = '0.0.1-SNAPSHOT'
sourceCompatibility = '11'
allprojects {
apply plugin: 'java'
apply plugin: 'org.springframework.boot'
apply plugin: 'io.spring.dependency-management'

repositories {
mavenCentral()
}
group = 'camp.nextstep.edu'
version = '0.0.1-SNAPSHOT'
sourceCompatibility = '11'

dependencies {
implementation 'org.springframework.boot:spring-boot-starter-actuator'
implementation 'org.springframework.boot:spring-boot-starter-data-jpa'
implementation 'org.springframework.boot:spring-boot-starter-web'
implementation 'org.flywaydb:flyway-core'
runtimeOnly 'com.h2database:h2'
testImplementation 'org.springframework.boot:spring-boot-starter-test'
}
repositories {
mavenCentral()
}

dependencies {
implementation 'org.springframework.boot:spring-boot-starter-actuator'
implementation 'org.springframework.boot:spring-boot-starter-data-jpa'
implementation 'org.springframework.boot:spring-boot-starter-web'
implementation 'org.flywaydb:flyway-core'
runtimeOnly 'com.h2database:h2'
testImplementation 'org.springframework.boot:spring-boot-starter-test'
}

test {
useJUnitPlatform()
test {
useJUnitPlatform()
}
}
2 changes: 2 additions & 0 deletions core/build.gradle
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
bootJar { enabled = false }
jar { enabled = true }
8 changes: 8 additions & 0 deletions domain-menu/build.gradle
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
bootJar { enabled = false }
jar { enabled = true }

dependencies {
implementation project(':core')
implementation project(':domain-menugroup')
implementation project(':domain-product')
}
6 changes: 6 additions & 0 deletions domain-menugroup/build.gradle
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
bootJar { enabled = false }
jar { enabled = true }

dependencies {
implementation project(':core')
}
8 changes: 8 additions & 0 deletions domain-order/build.gradle
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
bootJar { enabled = false }
jar { enabled = true }

dependencies {
implementation project(':core')
implementation project(':domain-menu')
implementation project(':domain-ordertable')
}
7 changes: 7 additions & 0 deletions domain-ordertable/build.gradle
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
bootJar { enabled = false }
jar { enabled = true }

dependencies {
implementation project(':core')
implementation project(':domain-tablegroup')
}
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

import kitchenpos.exception.InvalidOrderToChangeEmptyException;
import kitchenpos.exception.NotFoundOrderTableException;
import kitchenpos.menugroup.ui.dto.ChangeOrderTableEmptyRequest;
import kitchenpos.ordertable.ui.dto.ChangeOrderTableEmptyRequest;
import kitchenpos.ordertable.domain.OrderTable;
import kitchenpos.ordertable.domain.OrderTableValidator;
import kitchenpos.ordertable.repository.OrderTableRepository;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
package kitchenpos.ordertable.ui;

import kitchenpos.ordertable.application.TableService;
import kitchenpos.menugroup.ui.dto.ChangeOrderTableEmptyRequest;
import kitchenpos.ordertable.ui.dto.ChangeOrderTableEmptyRequest;
import kitchenpos.ordertable.ui.dto.ChangeOrderTableNumberOfGuestsRequest;
import kitchenpos.ordertable.ui.dto.OrderTableRequest;
import kitchenpos.ordertable.ui.dto.OrderTableResponse;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
package kitchenpos.menugroup.ui.dto;
package kitchenpos.ordertable.ui.dto;

public class ChangeOrderTableEmptyRequest {

Expand Down
7 changes: 7 additions & 0 deletions domain-product/build.gradle
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
bootJar { enabled = false }
jar { enabled = true }

dependencies {
implementation project(':core')
implementation project(':domain-tablegroup')
}
6 changes: 6 additions & 0 deletions domain-tablegroup/build.gradle
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
bootJar { enabled = false }
jar { enabled = true }

dependencies {
implementation project(':core')
}
11 changes: 11 additions & 0 deletions settings.gradle
Original file line number Diff line number Diff line change
@@ -1 +1,12 @@
rootProject.name = 'kitchenpos'

include 'app'
include 'core'
include 'domain-menu'
include 'domain-menugroup'
include 'domain-order'
include 'domain-ordertable'
include 'domain-ordertable'
include 'domain-product'
include 'domain-tablegroup'
Comment on lines 1 to +11
Copy link

Choose a reason for hiding this comment

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

고생하셨습니다.
사실 모듈을 나눠야할 필요가 있어서 나눴다기 보다는 미션 요구사항으로 나누라고해서 나눈거다 보니 어떻게 나누는 것보단 한 번 해본게 중요한 경험이라고 생각합니다 !!

그리고 이 과정에서 고민한 것들이 이후에 쓸모가 있지않을까용