Skip to content

[24기_박서영] spring tutorial 미션 제출합니다. - #2

Open
Mymyseoyoung wants to merge 4 commits into
CEOS-Developers:Mymyseoyoungfrom
Mymyseoyoung:Mymyseoyoung
Open

[24기_박서영] spring tutorial 미션 제출합니다.#2
Mymyseoyoung wants to merge 4 commits into
CEOS-Developers:Mymyseoyoungfrom
Mymyseoyoung:Mymyseoyoung

Conversation

@Mymyseoyoung

Copy link
Copy Markdown

No description provided.

@fervovita fervovita left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

꼼꼼히 잘 정리 해주셔서 좋았습니다👍👍
추가로 살펴볼 부분들은 코멘트로 남겨두었으니, 고민해보시면 좋을것 같아용!

1주차 과제 수고 많으셨습니다~!

Comment thread README.md

따라서 `NoUniqueBeanDefinitionException`이 발생한다.

##### 방법 1: `@Qualifier`

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

@Qualifier@Primary가 모두 적용되었을 때, 우선순위는 어떻게 될까요?

추가로, 수동 빈과 자동 빈의 우선순위에 대해서 알아보셔도 좋을 것 같아요!
(해당 부분은 Spring과 Spring Boot의 동작이 다르니, 두 경우를 나눠서 보시면 좋을 것 같아요!)

Comment thread README.md

##### 2 ) TomCat 이란 ?

대표적인 Servlet Container 이자 , Java 웹서버 .

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

WAS와 더불어 Web Server 관련 내용도 함께 보시면 좋을 것 같아요!

Tomcat이 "Servlet Container이자 웹 서버"로 소개되어 있는데, 두 역할이 어떻게 다른지 정리해 보시면 도움이 될 것 같아용.

앞단에 Nginx 같은 Web Server를 두는 구성도 많이 쓰이니, 왜 그렇게 나누는지 이유까지 보시면 좋겠습니다!

https://codechasseur.tistory.com/25

Comment thread README.md

**한 줄 정리:**

AOP는 로깅·트랜잭션처럼 여러 곳에서 반복되는 공통 기능을 별도로 분리하고, Spring 프록시가 실제 메서드 실행 전후에 그 기능을 적용하는 방식 !!

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

AOP 개념에 대해서 잘 정리되어 있는 것 같습니다 👍

AOP가 프록시 기반이라는 점 때문에 생기는 제약들(self-invocation, final/private 메서드)을 한 번 알아 보시면 좋을 것 같아요!

왜 이런 제약이 생기는지에 대해서 알아보시면서 JDK Dynamic Proxy와 CGLIB이 각각 어떻게 프록시를 만드는지도 알아보면 좋을 것 같습니다!!

Comment thread README.md

---

#### 6 ) doDispatch ( ) 핵심 흐름

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

doDispatch() 흐름을 ModelAndView -> ViewResolver -> View 렌더링 기준으로 잘 정리해 주셨는데, @RestController를 사용하는 REST API에서도 이 흐름이 그대로 적용될까요?

@Controller, @RestController에 따른 doDispatch()의 동작 차이를 한번 확인해보시면 좋을 것 같아요!!

Comment thread README.md
Comment on lines +163 to +169
**⇒ cf )) 이 코드는 왜 단위 테스트가 어려운가 ?**

: 단위테스트에서는 보통 실제 DB 대신 가짜 객체를 사용함 .

**문제점 : 변경에 열려 있고 확장에 닫혀 있다 ( OCP에 위배됨 )**

→ 즉 , 개발자가 직접 객체를 생성하거나 소멸시키면 메모리 낭비도 생김.

@chjpooh2002 chjpooh2002 Sep 11, 2026

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

객체를 클래스 내부에서 직접 생성하는 방식의 문제점을 SOLID 원칙과 연관지어 설명한 점이 좋았습니다!

Comment thread README.md
Comment on lines +266 to +275
**Spring Container의 종류**

대표적으로 두 가지 인터페이스가 있음.

| 종류 | 역할 |
| -------------------- | ----------------------------------------- |
| `BeanFactory` | Bean 생성과 DI 등 기본 기능 제공 |
| `ApplicationContext` | `BeanFactory` 기능 + 이벤트, 메시지, 환경설정 등 추가 기능 |

실제 Spring 애플리케이션에서는 대부분 `ApplicationContext`를 Spring Container로 사용 !!

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Spring Container의 종류에 BeanFactoryApplicationContext 있는지 언급하며 각각의 역할에 대해 설명하여 제가 정리하지 않은 내용에 대해 알아갈 수 있어서 좋았습니다! 감사합니다~!

Comment thread README.md
Comment on lines +762 to +764
#### ④ 초기화

의존성 주입이 끝나면 초기화 메서드가 실행된다.

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

빈 초기화/소멸 콜백에 어노테이션 방식 외에 다른 방식들도 존재하는데 한 번 알아보면 좋을 거 같습니다!
관련 내용에 대한 블로그 공유합니다!
[spring] 빈 초기화 콜백, 소멸 콜백

Comment thread README.md

```

예시 요청 :

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

예시 요청을 들어 처리 과정에 대해 설명해주셔서 웹 요청이 어떤 방식으로 처리되는지 이해하는데 도움이 많이 됐습니다!

Comment thread README.md
Comment on lines +621 to +637
**cf ) OOP와 AOP의 차이**

**Object-Oriented Programming, 객체 지향 프로그래밍)**

=프로그램을 여러 개의 **객체**로 나누고, 객체들이 서로 협력하도록 만드는 프로그래밍 방식

**핵심 비유 :**

- **OOP:** 업무를 주문팀, 결제팀, 회원팀으로 나눈다.
- **AOP:** 모든 팀에 필요한 출퇴근 기록이나 보안 검사를 별도 관리팀이 담당한다.

| 구분 | OOP | AOP |
| ----------- | --------------- | -------------- |
| 기준 | 역할과 책임 | 공통 관심사 |
| 나누는 대상 | 주문·결제·회원 등의 객체 | 로그·트랜잭션·보안 등 |
| 목적 | 핵심 기능을 객체별로 분리 | 중복되는 부가 기능을 분리 |
| 관계 | 프로그램의 기본 구조를 설계 | OOP의 중복 문제를 보완 |

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

객체 지향 프로그래밍과 관점 지향 프로그래밍으로 차이를 설명해주셔서 쉽게 이해할 수 있었습니다. 감사합니다~

@uoahns23

Copy link
Copy Markdown

정리를 너무 잘해주셔서 전체적으로 다시 복습하며 읽을 수 있었습니다. 감사합니다:)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants