OP pytales czy musisz uzywac Tomcata. Nie musisz ale zarazem jest on standardowym serwerem.
W Spring Boot masz
dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-tomcat</artifactId>
<version>2.0.0.RELEASE</version>
<scope>compile</scope>
</dependency>
Z kolei Starter-Tomcat zawiera:
<dependency>
<groupId>org.apache.tomcat.embed</groupId>
<artifactId>tomcat-embed-core</artifactId>
<version>8.5.23</version>
<scope>compile</scope>
</dependency>
<dependency>
<groupId>org.apache.tomcat.embed</groupId>
<artifactId>tomcat-embed-el</artifactId>
<version>8.5.23</version>
<scope>compile</scope>
</dependency>
<dependency>
<groupId>org.apache.tomcat.embed</groupId>
<artifactId>tomcat-embed-websocket</artifactId>
<version>8.5.23</version>
<scope>compile</scope>
</dependency>
Gdy uruchamiasz aplikacje w logach wyswietla o.s.b.w.embedded.tomcat.TomcatWebServer :
, ktory domyslnie startuje na porcie 8080. Tomcat jest domyslnym serwerem i mozesz sobie go zmienic na Jetty czy Undertow. Wyrzuc zaleznosci Tomcat z konfiguracji i zastap je tym:
<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>
Dla Undertow:
<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-undertow</artifactId>
</dependency>
Nastepnie w application.properties mozesz sobie skonfigurowac swoj nowy 'embedded'
server.compression.enabled=false
server.context-path=
server.display-name=application
server.error.include-stacktrace=never
server.error.path=/error
server.error.whitelabel.enabled=true
server.port=8080
server.server-header=
server.servlet-path=/
Wiecej opcji konfiguracyjnych tutaj: https://docs.spring.io/spring-boot/docs/current/reference/html/common-application-properties.html