Search icon CANCEL
Subscription
0
Cart icon
Your Cart (0 item)
Close icon
You have no products in your basket yet
Arrow left icon
Explore Products
Best Sellers
New Releases
Books
Videos
Audiobooks
Learning Hub
Free Learning
Arrow right icon
Arrow up icon
GO TO TOP
Spring Boot 2.0 Cookbook

You're reading from   Spring Boot 2.0 Cookbook Configure, test, extend, deploy, and monitor your Spring Boot application both outside and inside the cloud

Arrow left icon
Product type Paperback
Published in Feb 2018
Publisher
ISBN-13 9781787129825
Length 286 pages
Edition 2nd Edition
Languages
Tools
Arrow right icon
Author (1):
Arrow left icon
Alex Antonov Alex Antonov
Author Profile Icon Alex Antonov
Alex Antonov
Arrow right icon
View More author details
Toc

Table of Contents (11) Chapters Close

Preface 1. Getting Started with Spring Boot 2. Configuring Web Applications FREE CHAPTER 3. Web Framework Behavior Tuning 4. Writing Custom Spring Boot Starters 5. Application Testing 6. Application Packaging and Deployment 7. Health Monitoring and Data Visualization 8. Spring Boot DevTools 9. Spring Cloud 10. Other Books You May Enjoy

Choosing embedded servlet containers

If we decide that we want to use Jetty as our servlet container, we will need to add a Jetty starter to our build file.

How to do it...

  1. As Tomcat already comes as a transitive dependency of Spring Boot, we will need to exclude it from our build dependency tree by adding the following to build.gradle:
configurations { 
  compile.exclude module: "spring-boot-starter-tomcat" 
}
  1. We will also need to add a compile dependency to our build dependencies on Jetty:
compile("org.springframework.boot:spring-boot-starter-jetty")
  1. To fix the compiler errors, we will need to remove the bean declaration of Tomcat's RemoteIpFilter from our WebConfiguration class, as the Tomcat...
lock icon The rest of the chapter is locked
Register for a free Packt account to unlock a world of extra content!
A free Packt account unlocks extra newsletters, articles, discounted offers, and much more. Start advancing your knowledge today.
Unlock this book and the full library FREE for 7 days
Get unlimited access to 7000+ expert-authored eBooks and videos courses covering every tech area you can think of
Renews at $19.99/month. Cancel anytime
Banner background image