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