프로그램/SpringBoot
[Spring Boot] Maven 프로젝트에서 내장 서블릿 컨테이너를 Jetty 로 변경
로드러너
2021. 3. 26. 17:34
스프링 부트에 기본 내장된 Tomcat 을 Jetty 로 바꾸려면 pom.xml 파일만 변경하면 된다.
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-web</artifactId>
<exclusions>
<exclusion>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-tomcat</artifactId>
</exclusion>
</exclusions>
</dependency>
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-jetty</artifactId>
</dependency>
프로그램을 실행하면 Jetty가 구동된 것을 확인할 수 있다.