의존성별로 STS에서 Spring Starter Project를 Run As Spring Boot App했을때 콘솔창을 살펴보았다
1. 의존성 없는 Spring Starter Project
dependencies {
implementation 'org.springframework.boot:spring-boot-starter'
testImplementation 'org.springframework.boot:spring-boot-starter-test'
}
Run As Spring Boot App하면 콘솔창에 아래와같이 3줄이 나오고 terminated된다

Windows 실행되는 각 프로세스에는 PID(프로세스 ID)라는 고유한 10진수가 할당된다.
2. spring web만 추가한 Spring Starter Project
dependencies {
implementation 'org.springframework.boot:spring-boot-starter-web'
testImplementation 'org.springframework.boot:spring-boot-starter-test'
}
위에꺼랑 달라진거는 spring-boot-starter가 아니라 spring-boot-starter-web 인것
Run As Spring Boot App하면 콘솔창에 아래와같이 찍히고, 종료되지않고 켜져있다

순서가
Starting ~Application -> Tomcat, Apache Tomcat -> WebApplicationContext -> Tomcat started -> Started ~Application
Stop the process하면
Application shutdown requested. -> Stopping service [Tomcat]
'Spring > Spring MVC' 카테고리의 다른 글
| Cookie 확인( 생성및 조회, 삭제 ) (0) | 2024.05.27 |
|---|---|
| Spring MVC (0) | 2024.05.08 |
| 필터(Filter)와 인터셉터(Interceptor) (0) | 2022.12.07 |
| Spring Web (Spring Starter Project Dependencies ) (1) | 2022.09.15 |
| Spring, DispatcherServlet , org.springframework.web.servlet (0) | 2022.07.16 |