- Mastering Microservices with Java 9(Second Edition)
- Sourabh Sharma
- 180字
- 2021-07-02 21:54:46
Adding a Jetty-embedded server
Spring Boot by default provides Apache Tomcat as an embedded application container. This book will use the Jetty-embedded application container in the place of Apache Tomcat. Therefore, we need to add a Jetty application container dependency to support the Jetty web server.
Jetty also allows you to read keys or trust stores using classpaths, that is, you don't need to keep these stores outside the JAR files. If you use Tomcat with SSL then you will need to access the key store or trust store directly from the filesystem, but you can't do that using the classpath. The result is that you can't read a key store or a trust store within a JAR file because Tomcat requires that the key store (and trust store if you're using one) is directly accessible on the filesystem. This may change post writing of this book.
This limitation doesn't apply to Jetty, which allows the reading of keys or trust stores within a JAR file. A relative section on pom.xml of module rest:
<dependencies> <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> </dependencies>
- C語言程序設計(第2 版)
- Vue.js 3.0源碼解析(微課視頻版)
- 精通API架構:設計、運維與演進
- 算法訓練營:提高篇(全彩版)
- JAVA程序設計實驗教程
- 劍指Java:核心原理與應用實踐
- 前端HTML+CSS修煉之道(視頻同步+直播)
- Mastering Business Intelligence with MicroStrategy
- Processing創意編程指南
- Python入門很輕松(微課超值版)
- 大數據時代的企業升級之道(全3冊)
- C語言從入門到精通
- WCF技術剖析(卷1)
- Clojure Data Structures and Algorithms Cookbook
- Mastering Data Analysis with R