Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Sign in / Register
Toggle navigation
S
spring-boot
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
DEMO
spring-boot
Commits
70431c5d
Commit
70431c5d
authored
Feb 26, 2014
by
Dave Syer
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Add howto for Jetty
parent
89ebe51d
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
41 additions
and
0 deletions
+41
-0
howto.md
docs/howto.md
+41
-0
No files found.
docs/howto.md
View file @
70431c5d
...
...
@@ -175,6 +175,47 @@ are quite rich so once you have access to the
of ways. Or the nuclear option is to add your own
`JettyEmbeddedServletContainerFactory`
.
## Use Jetty instead of Tomcat
The Spring Boot starters ("spring-boot-starter-web" in particular) use
Tomcat as an embedded container by default. You need to exclude those
dependencies and include the Jetty ones to use that container. Spring
Boot provides Tomcat and Jetty dependencies bundled together as
separate startes to help make this process as easy as possible.
Example in Maven:
```
xml
<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>
```
Example in Gradle:
```
groovy
configurations
{
compile
.
exclude
module:
'spring-boot-starter-tomcat'
}
dependencies
{
compile
(
"org.springframework.boot:spring-boot-starter-web:1.0.0.RC3"
)
compile
(
"org.springframework.boot:spring-boot-starter-jetty:1.0.0.RC3"
)
...
}
```
## Use Jetty 9
Jetty 9 works with Spring Boot, but the default is to use Jetty 8 (so
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment