|
|
|
@ -884,18 +884,17 @@ add a listener to the `Builder`:
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
[[howto-use-tomcat-7]]
|
|
|
|
|
=== Use Tomcat 7
|
|
|
|
|
Tomcat 7 works with Spring Boot, but the default is to use Tomcat 8. If you cannot use
|
|
|
|
|
Tomcat 8 (for example, because you are using Java 1.6) you will need to change your
|
|
|
|
|
classpath to reference Tomcat 7 .
|
|
|
|
|
=== Use Tomcat 7.x or 8.0
|
|
|
|
|
Tomcat 7 & 8.0 work with Spring Boot, but the default is to use Tomcat 8.5. If you cannot
|
|
|
|
|
use Tomcat 8.5 (for example, because you are using Java 1.6) you will need to change your
|
|
|
|
|
classpath to reference a different version.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
==== Use Tomcat 7 with Maven
|
|
|
|
|
[[howto-use-tomcat-7-maven]]
|
|
|
|
|
|
|
|
|
|
If you are using the starters and parent you can just change the Tomcat version
|
|
|
|
|
property, e.g. for a simple webapp or service:
|
|
|
|
|
==== Use Tomcat 7.x or 8.0 with Maven
|
|
|
|
|
If you are using the starters and parent you can change the Tomcat version property
|
|
|
|
|
and additionally import `tomcat-juli`. E.g. for a simple webapp or service:
|
|
|
|
|
|
|
|
|
|
[source,xml,indent=0,subs="verbatim,quotes,attributes"]
|
|
|
|
|
----
|
|
|
|
@ -908,22 +907,28 @@ property, e.g. for a simple webapp or service:
|
|
|
|
|
<groupId>org.springframework.boot</groupId>
|
|
|
|
|
<artifactId>spring-boot-starter-web</artifactId>
|
|
|
|
|
</dependency>
|
|
|
|
|
<dependency>
|
|
|
|
|
<groupId>org.apache.tomcat</groupId>
|
|
|
|
|
<artifactId>tomcat-juli</artifactId>
|
|
|
|
|
<version>${tomcat.version}</version>
|
|
|
|
|
</dependency>
|
|
|
|
|
...
|
|
|
|
|
</dependencies>
|
|
|
|
|
----
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
==== Use Tomcat 7 with Gradle
|
|
|
|
|
==== Use Tomcat 7.x or 8.0 with Gradle
|
|
|
|
|
[[howto-use-tomcat-7-gradle]]
|
|
|
|
|
|
|
|
|
|
You can change the Tomcat version by setting the `tomcat.version` property:
|
|
|
|
|
With Gradle, you can change the Tomcat version by setting the `tomcat.version` property
|
|
|
|
|
and then additionally include `tomcat-juli`:
|
|
|
|
|
|
|
|
|
|
[source,groovy,indent=0,subs="verbatim,quotes,attributes"]
|
|
|
|
|
----
|
|
|
|
|
ext['tomcat.version'] = '7.0.59'
|
|
|
|
|
dependencies {
|
|
|
|
|
compile 'org.springframework.boot:spring-boot-starter-web'
|
|
|
|
|
compile group:'org.apache.tomcat', name:'tomcat-juli', version:property('tomcat.version')
|
|
|
|
|
}
|
|
|
|
|
----
|
|
|
|
|
|
|
|
|
|