How to use Tomcat 8 + Spring Boot + Maven
When using Spring Boot overriding tomcat with tomcat.version
as a property will only work if you use spring-boot-starter-parent
as a parent for your project.
<parent>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-parent</artifactId>
<version>1.1.0.M2</version>
</parent>
(change the version to the one you like).
<properties>
<tomcat.version>8.0.8</tomcat.version>
</properties>
If you don't want to use this as a parent you will have to use a <dependencyManagement>
section in your pom.xml to override all the spring versions and leave the properties as above.
<dependencyManagement>
<dependencies>
<dependency>
<groupId>org.apache.tomcat.embed</groupId>
<artifactId>tomcat-embed-core</artifactId>
<version>${tomcat.version}</version>
</dependency>
<dependency>
<groupId>org.apache.tomcat.embed</groupId>
<artifactId>tomcat-embed-el</artifactId>
<version>${tomcat.version}</version>
</dependency>
<dependency>
<groupId>org.apache.tomcat.embed</groupId>
<artifactId>tomcat-embed-logging-juli</artifactId>
<version>${tomcat.version}</version>
</dependency>
<dependency>
<groupId>org.apache.tomcat.embed</groupId>
<artifactId>tomcat-embed-jasper</artifactId>
<version>${tomcat.version}</version>
</dependency>
<dependency>
<groupId>org.apache.tomcat.embed</groupId>
<artifactId>tomcat-embed-websocket</artifactId>
<version>${tomcat.version}</version>
</dependency>
<dependency>
<groupId>org.apache.tomcat</groupId>
<artifactId>tomcat-jdbc</artifactId>
<version>${tomcat.version}</version>
</dependency>
<dependency>
<groupId>org.apache.tomcat</groupId>
<artifactId>tomcat-jsp-api</artifactId>
<version>${tomcat.version}</version>
</dependency>
</dependencies>
</dependencyManagement>
Either way will work but extending the parent is the easiest I would say, however this isn't always possible.
Did you try overriding tomcat.version in your application.properties? Specifically, setting it to 8.0.3 makes spring boot run 8.0.3 instead of whatever the default is.