본문 바로가기
Spring/Spring MVC

의존성에 따른 Run As Spring Boot App했을때 콘솔창

by doriver 2022. 11. 18.

의존성별로 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]