- 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>
- Visual C++數(shù)字圖像模式識別技術(shù)詳解
- 零基礎學Java(第4版)
- STM32F0實戰(zhàn):基于HAL庫開發(fā)
- iOS編程基礎:Swift、Xcode和Cocoa入門指南
- 基于Struts、Hibernate、Spring架構(gòu)的Web應用開發(fā)
- RealSenseTM互動開發(fā)實戰(zhàn)
- 小程序,巧應用:微信小程序開發(fā)實戰(zhàn)(第2版)
- Android驅(qū)動開發(fā)權(quán)威指南
- Android嵌入式系統(tǒng)程序開發(fā):基于Cortex-A8(第2版)
- C++編程兵書
- 程序員的成長課
- Java EE項目應用開發(fā)
- Java RESTful Web Service實戰(zhàn)
- Java EE實用教程
- WCF全面解析