Address 클래스에서 @Embeddable 이유
미해결
실전! 스프링 부트와 JPA 활용1 - 웹 애플리케이션 개발
Address, Member, Order 클래스에서 Address 클래스에만 @Embeddable, @Embedded 어노테이션을 다는 이유가 궁금합니다. @Entity를 달면 안되는 이유가 있나요?
- java
- spring-boot
- spring
- 웹앱
- JPA
176만명의 커뮤니티!! 함께 토론해봐요.
미해결
실전! 스프링 부트와 JPA 활용1 - 웹 애플리케이션 개발
Address, Member, Order 클래스에서 Address 클래스에만 @Embeddable, @Embedded 어노테이션을 다는 이유가 궁금합니다. @Entity를 달면 안되는 이유가 있나요?
해결됨
실전! 스프링 부트와 JPA 활용1 - 웹 애플리케이션 개발
학습하는 분들께 도움이 되고, 더 좋은 답변을 드릴 수 있도록 질문전에 다음을 꼭 확인해주세요. 1. 강의 내용과 관련된 질문을 남겨주세요. 2. 인프런의 질문 게시판과 자주 하는 질문(링크)을 먼저 확인해주세요. (자주 하는 질문 링크: https://bit.ly/3fX6ygx) 3. 질문 잘하기 메뉴얼(링크)을 먼저 읽어주세요. (질문 잘하기 메뉴얼 링크: https://bit.ly/2UfeqCG) 질문 시에는 위 내용은 삭제하고 다음 내용을 남겨주세요. ========================================= [질문 템플릿] 1. 강의 내용과 관련된 질문인가요? (예/아니오) 2. 인프런의 질문 게시판과 자주 하는 질문에 없는 내용인가요? (예/아니오) 3. 질문 잘하기 메뉴얼을 읽어보셨나요? (예/아니오) [질문 내용] 안녕하세요. 회원도메인 개발 섹션의 회원 기능 테스트 강의를 듣다가 궁금한 점이 생겨서 질문을 남깁니다. 테스트를 할 때 MemberService와 MemberRepository를 사용하기 위해 @Autowired를 이용해 진행하셔서 제가 별도로 AnnotationConfigApplicationContext 를 사용해 테스트 코드를 수정해봤더니 첨부한 사진과 같이 테스트에 실패하였습니다. 어쨌든 MemberService와 MemberRepository모두 스프링 컨테이너에 등록됐고, 의존성 주입도 완료됐기 때문에 테스트가 통과될 줄 알았는데, 어느 부분에서 제가 잘못 이해하고 있는 것인지 구글링을 해봐도 명확한 답을 찾지 못해 질문 남깁니다. 제가 야생형 코스를 따라가려고 아직 JPA첫 번째 강의는 보지 못한 상태입니다. 아래는 제가 수정한 코드입니다. AutoAppConfig 클래스를 생성해 @ComponentScan애노테이션도 붙인 상태로 진행했습니다. // MemberServiceTest package japbook.jpashop.service ; import japbook.jpashop.AutoAppConfig ; import japbook.jpashop.domain.Member ; import japbook.jpashop.repository.MemberRepository ; import org.assertj.core.api.Assertions ; import org.junit.jupiter.api. Test ; import org.springframework.beans.factory.annotation. Autowired ; import org.springframework.boot.test.context. SpringBootTest ; import org.springframework.context.ApplicationContext ; import org.springframework.context.annotation.AnnotationConfigApplicationContext ; import org.springframework.transaction.annotation. Transactional ; import static org.junit.jupiter.api.Assertions.* ; @SpringBootTest @Transactional class MemberServiceTest { // @Autowired // MemberService memberService; // // @Autowired // MemberRepository memberRepository; AnnotationConfigApplicationContext ac = new AnnotationConfigApplicationContext(AutoAppConfig. class ) ; MemberService memberService = ac .getBean(MemberService. class ) ; MemberRepository memberRepository = ac .getBean(MemberRepository. class ) ; @Test public void 회원가입 () { // MemberService bean = ac.getBean(MemberService.class); // System.out.println("bean = " + bean); Member member = new Member() ; member.setName( "Cha1" ) ; Long savedMember = memberService .join(member) ; Assertions. assertThat (member).isEqualTo( memberRepository .findOne(savedMember)) ; } @Test public void 중복회원예외 () { } } // AutoAppConfig package japbook.jpashop ; import org.springframework.context.annotation. ComponentScan ; @ComponentScan public class AutoAppConfig { }
해결됨
실전! 스프링 부트와 JPA 활용1 - 웹 애플리케이션 개발
안녕하십니까 Order 엔티티와 OrderItem 엔티티의 일대다 관계에서는 @OneToMany(mappedBy = "order") private List<OrderItem> orderItems = new ArrayList<>(); 위와 같이 매핑을 해줬는데 Item 엔티티와 OrderItem 엔티티의 일대다 관계에서는 매핑을 안해줘도 되나요?
미해결
실전! 스프링 부트와 JPA 활용1 - 웹 애플리케이션 개발
실행시 다음과 같은 에러가 발생합니다. initializationError() build.gradle 파일코드는 아래와 같습니다. plugins { id 'org.springframework.boot' version '2.7.2' id 'io.spring.dependency-management' version '1.0.12.RELEASE' id 'java' } group = 'jpabook' version = '0.0.1-SNAPSHOT' sourceCompatibility = '11' configurations { compileOnly { extendsFrom annotationProcessor } } repositories { mavenCentral() } dependencies { implementation 'org.springframework.boot:spring-boot-starter-data-jpa' implementation 'org.springframework.boot:spring-boot-starter-thymeleaf' implementation 'org.springframework.boot:spring-boot-starter-web' implementation 'org.springframework.boot:spring-boot-devtools' compileOnly 'org.projectlombok:lombok' runtimeOnly 'com.h2database:h2' annotationProcessor 'org.projectlombok:lombok' testImplementation 'org.springframework.boot:spring-boot-starter-test' //JUnit4 추가 testImplementation("org.junit.vintage:junit-vintage-engine") { exclude group: "org.hamcrest", module: "hamcrest-core" } } test { useJUnitPlatform() } ylm 파일 띄어쓰기도 맞췄고, url의 MVCC=TRUE도 제거했으며 build Tools > Gradle 도 IntelliJ IDEA로 맞췄는데 어느부분이 문제인지 모르겠습니다. H2 콘솔도 잘 켠 것 같습니다만.. 어디가 잘못된걸까요..?
미해결
실전! 스프링 부트와 JPA 활용1 - 웹 애플리케이션 개발
학습하는 분들께 도움이 되고, 더 좋은 답변을 드릴 수 있도록 질문전에 다음을 꼭 확인해주세요. 1. 강의 내용과 관련된 질문을 남겨주세요. 2. 인프런의 질문 게시판과 자주 하는 질문(링크)을 먼저 확인해주세요. (자주 하는 질문 링크: https://bit.ly/3fX6ygx) 3. 질문 잘하기 메뉴얼(링크)을 먼저 읽어주세요. (질문 잘하기 메뉴얼 링크: https://bit.ly/2UfeqCG) 질문 시에는 위 내용은 삭제하고 다음 내용을 남겨주세요. ========================================= [질문 템플릿] 1. 강의 내용과 관련된 질문인가요? (예/아니오) 2. 인프런의 질문 게시판과 자주 하는 질문에 없는 내용인가요? (예/아니오) 3. 질문 잘하기 메뉴얼을 읽어보셨나요? (예/아니오) [질문 내용] 여기에 질문 내용을 남겨주세요. 저는 중복 이름 허용하려고 이렇게 두신 줄 알았는데 여기서 보니까 중복 이름을 허용하지 않으시더라구요 그럴거면 굳이 List로 반환 받을 필요 없고 getSingleResult로 받아도 상관 없는 건가요? 실제 성능이나 이런 건 아무 관계 없겠지만 의미상 저게 더 맞는 것 같아서요. 그리고 id가 서비스에서 추가하는 시점에서 생성되어 있지 않기 때문에 이름으로 검증하는 것으로 알고 있는데, 만약 중복 이름을 허용하고 싶으면 어느 시점에서 검증해야 할까요?
해결됨
실전! 스프링 부트와 JPA 활용1 - 웹 애플리케이션 개발
[질문 템플릿] 1. 강의 내용과 관련된 질문인가요? ( 예/ 아니오) 2. 인프런의 질문 게시판과 자주 하는 질문에 없는 내용인가요? ( 예 /아니오) 3. 질문 잘하기 메뉴얼을 읽어보셨나요? ( 예 / 아니오 ) [질문 내용] 여기에 질문 내용을 남겨주세요. 안녕하세요, 현재 <JPA와 DB 설정, 동작확인> 내용을 (09:13) 따라가면서 듣고 있는데 import하는 Assert 부분에서 오류가 납니다. <강의> <내 코드> 구글링해서 찾아보니까 (https://aonee.tistory.com/2) build.gradle에 밑 내용 넣으면 된다고 하는데 다른 방법이 있나요? 강의에서는 안 넣어도 잘 되는 것 같아서 여쭤봅니다. 또 제가 devtools 동작오류가 있어서 (https://www.inflearn.com/course/스프링부트-JPA-활용-1/unit/24277?tab=community&q=152186) 질문에서 알려준 사이트 내용대로 build.gradle에 apply plugin: 'idea'를 적었습니다. 저는 이 부분을 바꾸지 않는 선에서 오류를 해결하고 싶어서 다른 방법을 찾고 싶습니다. 추가) 비슷한 질문 보니까 build.gradle를 올리면 좋다고 하셔서 추가합니다. https://www.inflearn.com/course/ 스프링부트 -JPA- 활용 -1/unit/24279?tab=community&q=580709 <bulid.gradle> plugins { id 'org.springframework.boot' version '2.7.2' id 'io.spring.dependency-management' version '1.0.12.RELEASE' id 'java' } apply plugin: 'idea' group = 'jpabook' version = '0.0.1-SNAPSHOT' sourceCompatibility = '11' configurations { compileOnly { extendsFrom annotationProcessor } } repositories { mavenCentral() } dependencies { implementation 'org.springframework.boot:spring-boot-starter-data-jpa' implementation 'org.springframework.boot:spring-boot-starter-thymeleaf' implementation 'org.springframework.boot:spring-boot-starter-web' implementation 'org.springframework.boot:spring-boot-devtools' compileOnly 'org.projectlombok:lombok' runtimeOnly 'com.h2database:h2' annotationProcessor 'org.projectlombok:lombok' testImplementation 'org.springframework.boot:spring-boot-starter-test' } tasks.named('test') { useJUnitPlatform() }
해결됨
실전! 스프링 부트와 JPA 활용1 - 웹 애플리케이션 개발
MemberRepositoryTest을 실행 했는데 아래와 같이 에러가 나옵니다 Execution failed for task ':test'. > No tests found for given includes: [jpabook.jpashop.MemberRepositoryTest](--tests filter) * Try: > Run with --stacktrace option to get the stack trace. > Run with --info or --debug option to get more log output. > Run with --scan to get full insights. MemberRepositoryTest코드 package jpabook.jpashop; import static org.junit.Assert.*; import jpabook.jpashop.Member; import jpabook.jpashop.MemberRepository; import org.assertj.core.api.Assertions; import org.junit.Test; import org.junit.runner.RunWith; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.boot.test.context.SpringBootTest; import org.springframework.test.annotation.Rollback; import org.springframework.test.context.junit4.SpringRunner; import org.springframework.transaction.annotation.Transactional; import javax.persistence.EntityManager; @RunWith(SpringRunner.class) @SpringBootTest public class MemberRepositoryTest { @Autowired MemberRepository memberRepository; @Test @Transactional @Rollback(false) public void testMember() { Member member = new Member(); member.setUsername("memberA"); Long savedId = memberRepository.save(member); Member findMember = memberRepository.find(savedId); Assertions.assertThat(findMember.getId()).isEqualTo(member.getId()); Assertions.assertThat(findMember.getUsername()).isEqualTo(member.getUsername()); Assertions.assertThat(findMember).isEqualTo(member); //JPA 엔티티 동일성 보장 } } application.yml코드 spring: datasource: url: jdbc:h2:tcp://localhost/~/jpashop username: sa password: driver-class-name: org.h2.Driver jpa: hibernate: ddl-auto: create properties: hibernate: # show_sql: true format_sql: true logging.level: org.hibernate.SQL: debug # org.hibernate.type: trace build.gradle코드 plugins { id 'org.springframework.boot' version '2.7.2' id 'io.spring.dependency-management' version '1.0.12.RELEASE' id 'java' } group = 'jpabook' version = '0.0.1-SNAPSHOT' sourceCompatibility = '11' configurations { compileOnly { extendsFrom annotationProcessor } } repositories { mavenCentral() } dependencies { implementation 'org.springframework.boot:spring-boot-starter-data-jpa' implementation 'org.springframework.boot:spring-boot-starter-thymeleaf' implementation 'org.springframework.boot:spring-boot-starter-web' implementation 'org.springframework.boot:spring-boot-devtools' implementation 'junit:junit:4.13.1' compileOnly 'org.projectlombok:lombok' runtimeOnly 'com.h2database:h2' annotationProcessor 'org.projectlombok:lombok' testImplementation 'org.springframework.boot:spring-boot-starter-test' } tasks.named('test') { useJUnitPlatform() } 인프런 질문에도 찾아보고 구글링도 해봤는데 뭐때문인지 몰라 질문을 합니다 도와주세요ㅠ 아래는 제코드 구글드라이브 공유링크입니다. https://drive.google.com/drive/folders/1h5v97WrZW3rjxwzl_G2_73a17sXsQYpw?usp=sharing
미해결
실전! 스프링 부트와 JPA 활용1 - 웹 애플리케이션 개발
강의 초반부에 MemberForm객체를 domain 패키지가 아닌 controller 패키지에 생성하시는 이유가 MemberForm 객체의 주 사용 클래스가 controller여서가 맞는지 궁금합니다..!
해결됨
실전! 스프링 부트와 JPA 활용1 - 웹 애플리케이션 개발
아무래도 회원과 주문이 존재한다면 주문 내역 조회같은 로직이 거의 포함된다고 생각합니다! 이럴 때는 양방향 매핑 관계를 통해 조회하는 것이 좋은지 , 아니면 주문 테이블에서 member.getId()로 select 쿼리문을 날려서 조회하는 것이 좋은지 궁금합니다.
해결됨
실전! 스프링 부트와 JPA 활용1 - 웹 애플리케이션 개발
- 학습 관련 질문을 남겨주세요. 상세히 작성하면 더 좋아요! - 먼저 유사한 질문이 있었는지 검색해보세요. - 서로 예의를 지키며 존중하는 문화를 만들어가요. - 잠깐! 인프런 서비스 운영 관련 문의는 1:1 문의하기를 이용해주세요. org.hibernate.TransientPropertyValueException: object references an unsaved transient instance - save the transient instance before flushing : jpabook.jpashop.domain.Order.delivery -> jpabook.jpashop.domain.Delivery 어떤 부분에서 문제가 생기는지 못찾아서 전체 파일 첨부합니다.. https://drive.google.com/drive/folders/1I0oUU741fn4nApLLQ-e_16pY0H-dywyz?usp=sharing
미해결
실전! 스프링 부트와 JPA 활용1 - 웹 애플리케이션 개발
메세지 검증방식으로 해보았습니다. Junit5로 시도하는분들에게 도움이 되길~ public class NotEnoughStockException extends RuntimeException{ @Override public String getMessage() { return "재고가 모자랍니다"; } } NotEnoughStockException thrown = assertThrows(NotEnoughStockException.class, () -> orderService.order(member.getId(), item.getId(), order)); assertEquals("재고가 모자랍니다", thrown.getMessage());
미해결
실전! 스프링 부트와 JPA 활용1 - 웹 애플리케이션 개발
윈도우는 h2.bat으로 접속을 했습니다. 2:08 부분에서 ll 와 ls - arlth 명령어를 통해 jpashop.mv.db가 생성되는 것을 확인할 때 윈도우 명령어로는 어떻게 진행해야 할까요? 보시는 것처럼 연결하게 되면 키 입력이 먹히지 않아 확인을 어떻게 해야할지... 윈도우 명령어랑 리눅스 명령어 비교를 해보려고 찾아봤는데 딱 맞는게 없는거 같아서 질문드립니다.
해결됨
OpenCV + WebApp (얼굴 눈 검출 웹앱만들기)
안녕하세요 선생님~!! workon으로 가상환경을 진입하여 python을 실행뒤 import cv2를 하니 No module named 'cv2'라고 opencv 를 분명히 설치하였음에도 찾을수 없다라고 나옵니다 가상환경이 아닌경우에는 cv2를 import하는데 에러가 발생하지 않는데 가상환경에서만 에러가 발생하는군요... 선생님 강의를 하나도 빠짐없이 쫓아갔음에도 어디서 제가 멀 누락했는지... 몇번을 다시 반복해도 마찬가지 인데 어디가 문제일까요?? 참고로 python버전은 python3.10 입니다
해결됨
실전! 스프링 부트와 JPA 활용1 - 웹 애플리케이션 개발
Error creating bean with name 'entityManagerFactory' defined in class path resource [org/springframework/boot/autoconfigure/orm/jpa/HibernateJpaConfiguration.class]: Invocation of init method failed; nested exception is org.hibernate.AnnotationException: Use of @OneToMany or @ManyToMany targeting an unmapped class: jpabook.jpashop.domain.item.Item.categories[jpabook.jpashop.domain.Category] 이런 에러가 발생합니다. 코드 첨부합니다. 해당 부분을 지우면 문제없이 돌아가요.. package jpabook.jpashop.domain; import jpabook.jpashop.domain.item.Item; import lombok.Getter; import lombok.Setter; import javax.persistence.*; import java.util.ArrayList; import java.util.List; @Embeddable @Getter @Setter public class Category { @Id @GeneratedValue @Column(name = "category_id") private Long id; private String name; @ManyToMany @JoinTable(name = "category_item", joinColumns = @JoinColumn(name = "category_id"), inverseJoinColumns = @JoinColumn(name = "item_id")) private List<Item> items = new ArrayList<>(); @ManyToOne(fetch = FetchType.LAZY) @JoinColumn(name = "parent_id") private Category parent; @OneToMany(mappedBy = "parent") private List<Category> child = new ArrayList<>(); public void addChildCategory(Category child) { this.child.add(child); child.setParent(this); } protected Category(){} } package jpabook.jpashop.domain.item; import jpabook.jpashop.domain.Category; import lombok.Getter; import lombok.Setter; import javax.persistence.*; import java.util.ArrayList; import java.util.List; @Entity @Inheritance(strategy = InheritanceType.SINGLE_TABLE) @DiscriminatorColumn(name = "dtype") @Getter @Setter public abstract class Item { @Id @GeneratedValue @Column(name = "item_id") private Long id; private String name; private int price; private int stockQuantity; @ManyToMany(mappedBy = "items") private List<Category> categories = new ArrayList<Category>(); }
미해결
실전! 스프링 부트와 JPA 활용1 - 웹 애플리케이션 개발
안녕하세요, 이 프로그램을 좀 더 발전시켜보고 싶은데요 주문할 때 상품을 여러개 선택하도록 만들고싶은데, 이렇게 하려면 상품과 주문 수량을 골랐을 때 다시 화면에 추가로 선택 칸이 만들어져야 할 것 같습니다. 이 기능을 혹시 스프링과 타임리프 만으로 구현할 수 있나요, 아니면 자바스크립트를 공부해서 만들어야 할까요? 대략적인 가이드라도 조언 부탁드립니다. 감사합니다.
미해결
실전! 스프링 부트와 JPA 활용1 - 웹 애플리케이션 개발
강의를 보던 중에 연관 관계 메소드에 관련되어서 질문이 있습니다. Category 클래스에서 보면 엔티티 안에서 멤버 변수들끼리 양방향 관계를 맺는 parent랑 child가 있는데 아래 코드가 잘 이해가 안됩니다. this.child는 멤버 변수 child를 의미하는데 child 리스트 안에 파라미터인 child를 넣는다는 뜻인건가요? 그리고 child.setParent에는 왜 this가 들어가나요..? this는 객체 자신인 Category라고 알고 있는데 제가 잘못 안건가요? public void addChildCategory (Category child){ this . child .add(child) ; child.setParent( this ) ; }
미해결
실전! 스프링 부트와 JPA 활용1 - 웹 애플리케이션 개발
스프링 데이터 jpa를 사용하여 여러 연관관계를 가진 엔티티를 만들었는데 이 강의에서처럼 연관관계 편의메서드에서 하신 것처럼 연관관계가 설정된 엔티티에 따로 설정(member.getOrders().add(this) 같은) 을 따로 해주지 않았는데 문제가 없었습니다. 특별히 어떤 이유에서 연관관계 설정 메서드를 정의하신건가요?
미해결
실전! 스프링 부트와 JPA 활용1 - 웹 애플리케이션 개발
1. 강의 내용과 관련된 질문인가요? 아니오 2. 인프런의 질문 게시판과 자주 하는 질문에 없는 내용인가요? 예 3. 질문 잘하기 메뉴얼을 읽어보셨나요? 예 [질문 내용] 안녕하세요? JPA 수업 수강 후, 실제 업무에 적용하는 와중에 궁금한 점이 있어서 질문 남깁니다. DB Update를 위한 Entity Method의 파라미터로 DTO를 받는 것이 프로그램 구동상에는 전혀 문제는 없는데요. Domain driven design을 구현하는데에 있어서 엔티티 메소드의 파라미터로 DTO를 집어넣는게 바람직한 설계(?) 인지 문의 드립니다. 질문의 보다 빠른 이해를 위해 샘플 코드 및 시나리오를 아래와 같이 남깁니다. - 상황 : 회원정보수정 API의 input으로 MemberDTO를 받음 - Member DTO 내에 ContactDTO, List<AddressDTO>를 가진 구조 (Nested) class MemberDTO { ... private ContactDTO contactDTO; private List<AddressDTO> addressDTO; ... } - Service 레벨에서 memberRepository.findById() 통하여 Member Entity를 불러옴. - Member Entity와 Contact Entity은 1:1조인, Address Entity와는 1:N 조인 - Contact 및 Address 업데이트를 위해 Entity레벨에 다음의 메소드를 구현해두었으며, member.getContact().updateContact(contactDTO)로 해당 메소드를 호출 @Entity class Contact(또는 Address) { ... public void updateContact (ContactDTO contactDTO) { ... this.phoneNumber = contactDTO.getPhoneNumber(); ... ... } } 감사합니다.
미해결
실전! 스프링 부트와 JPA 활용1 - 웹 애플리케이션 개발
안녕하세요. 강의 정말 잘 듣고있습니다! 다름이 아니라 아..마..도? devtools dependency를 추가해주고 난 다음 발생한 것 같은데 hello.html에서 ${data} 빨간줄이 그어져 있네요. 마우스로 갖다 대보니 cannot resolve 'data'라는 문구가 뜨지만 실행 시키면 콘솔 창에 별다른 오류도 없고 devtools 등 전부 정상 작동 합니다. 어떤 것 때문에 그런것일까요??
해결됨
실전! 스프링 부트와 JPA 활용1 - 웹 애플리케이션 개발
[질문 템플릿] 1. 강의 내용과 관련된 질문인가요? (예) 2. 인프런의 질문 게시판과 자주 하는 질문에 없는 내용인가요? (예) 3. 질문 잘하기 메뉴얼을 읽어보셨나요? (예) [질문 내용] 김영한 멘토님 덕분에 스프링에 대해서 쉽게 공부할 수 있어서 항상 감사함을 느끼고 있습니다. 멘토님의 강의를 복습하던 중 궁금한 것이 생겨서 질문 남깁니다. 제가 의구심을 가지는 코드 부분은 다음과 같습니다. @Service @Transactional(readOnly = true) @RequiredArgsConstructor public class OrderService { private final MemberRepository memberRepository; private final OrderRepository orderRepository; private final ItemRepository itemRepository; /** 주문 */ @Transactional public Long order(Long memberId, Long itemId, int count) { //엔티티 조회 Member member = memberRepository.findOne(memberId); Item item = itemRepository.findOne(itemId); .... } .... } @Service @Transactional(readOnly = true) @RequiredArgsConstructor public class ItemService { private final ItemRepository itemRepository; .... public Item findOne(Long itemId) { return itemRepository.findOne(itemId); } } @Repository @RequiredArgsConstructor public class ItemRepository { .... public Item findOne(Long id) { return em.find(Item.class, id); } } 여기서 제가 궁금한 점은 OrderService에서 ItemService 대신 itemRepository를 주입한 이유가 궁금합니다! 물론, 둘 다 실행은 동일하게 되지만, itemRepository를 ItemService에서만 접근하게 하고, 타 클래스에서 item에 관한 로직은 무조건 ItemService으로만 접근하는 식으로 해야 item에 관련된 로직들이 응집도가 높아지고, 모듈 간 결합도가 낮아지지 않을까요?? 멘토님의 의견이 궁급합니다!