Skip to content

Commit 630d2dd

Browse files
author
Phillip Webb
committed
Port Add Maven example for Tomcat 8
Port Add Maven example for Tomcat 8 from markdown to asciidoc. (originally from commit 15372cb)
1 parent 9f112ff commit 630d2dd

File tree

1 file changed

+19
-1
lines changed

1 file changed

+19
-1
lines changed

spring-boot-docs/src/main/asciidoc/howto.adoc

Lines changed: 19 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -477,7 +477,25 @@ of ways. Or the nuclear option is to add your own `JettyEmbeddedServletContainer
477477
[[howto-use-tomcat-8]]
478478
=== Use Tomcat 8
479479
Tomcat 8 works with Spring Boot, but the default is to use Tomcat 7 (so we can support
480-
Java 1.6 out of the box). You should only need to change the classpath to use Tomcat 8
480+
Java 1.6 out of the box). You should only need to change the classpath to use
481+
Tomcat 8 for it to work. For example, using the starter poms in Maven:
482+
483+
[source,xml,indent=0,subs="verbatim,quotes,attributes"]
484+
----
485+
<properties>
486+
<tomcat.version>8.0.3</tomcat.version>
487+
</properties>
488+
<dependencies>
489+
...
490+
<dependency>
491+
<groupId>org.springframework.boot</groupId>
492+
<artifactId>spring-boot-starter-web</artifactId>
493+
</dependency>
494+
...
495+
</dependencies>
496+
----
497+
498+
change the classpath to use Tomcat 8
481499
for it to work. The {github-code}/spring-boot-samples/spring-boot-sample-websocket/pom.xml[websocket sample]
482500
shows you how to do that in Maven.
483501

0 commit comments

Comments
 (0)