내장된 톰캣 말고 다른 서버로 변경해보자.
jetty로 변경
jetty를 쓰고싶다면 spring-boot-starter-web에 내장되어 tomcat를 제외시키고 jettyspring-boot-starter-jetty를 추가하면 된다.
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-web</artifactId>
<exclusions>
<!-- Exclude the Tomcat dependency -->
<exclusion>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-tomcat</artifactId>
</exclusion>
</exclusions>
</dependency>
<!-- Use Jetty instead -->
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-jetty</artifactId>
</dependency>
undertow로 변경
undertow를 쓰고 싶다면 spring-boot-starter-undertow를 추가하면 되겠다.
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-web</artifactId>
<exclusions>
<!-- Exclude the Tomcat dependency -->
<exclusion>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-tomcat</artifactId>
</exclusion>
</exclusions>
</dependency>
<!-- Use Undertow instead -->
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-undertow</artifactId>
</dependency>
'Springboot' 카테고리의 다른 글
SpringApplication (0) | 2021.01.06 |
---|---|
스프링부트, 독립적으로 실행 가능한 JAR (0) | 2021.01.06 |
스프링 부트 포트 번호 변경, 랜덤포트, 포트 번호 확인하기 (0) | 2021.01.05 |
스프링 부트의 내장 웹 서버(더 엄밀히 말하면 WAS)에 대하여 (0) | 2021.01.05 |
스프링 부트의 Auto Configuration 직접 구현해보기 (0) | 2021.01.05 |
스프링 부트 자동설정 간단하게 이해하기 (0) | 2021.01.05 |