Building RESTful Web Services with Spring 5 - Second Edition: Leverage the power of Spring 5.0, JavaSE 9 and Spring Boot 2.0

Raja CSP Raman, Ludovic Dewailly

  • 出版商: Packt Publishing
  • 出版日期: 2018-01-24
  • 定價: $1,480
  • 售價: 6.0$888
  • 語言: 英文
  • 頁數: 228
  • 裝訂: Paperback
  • ISBN: 1788475895
  • ISBN-13: 9781788475891
  • 相關分類: Java 相關技術
  • 立即出貨 (庫存 < 3)


Find out how to implement the REST architecture to build resilient software in Java with the help of the Spring 5.0 framework.

Key Features

  • Follow best practices and explore techniques such as clustering and caching to achieve a reactive, scalable web service,
  • Leverage the Spring Framework to quickly implement RESTful endpoints,
  • Learn to implement a client library for a RESTful web service using the Spring Framework along with the new front end framework.

Book Description

REST is an architectural style that tackles the challenges of building scalable web services. In today's connected world, APIs have taken a central role on the web. APIs provide the fabric through which systems interact, and REST has become synonymous with APIs.The depth, breadth, and ease of use of Spring makes it one of the most attractive frameworks in the Java ecosystem. Marrying the two technologies is therefore a very natural choice.This book takes you through the design of RESTful web services and leverages the Spring Framework to implement these services. Starting from the basics of the philosophy behind REST, you'll go through the steps of designing and implementing an enterprise-grade RESTful web service. Taking a practical approach, each chapter provides code samples that you can apply to your own circumstances.This second edition brings forth the power of the latest Spring 5.0 release, working with MVC built-in as well as the front end framework. It then goes beyond the use of Spring to explores approaches to tackle resilience, security, and scalability concerns. Improve performance of your applications with the new HTTP 2.0 standards. You'll learn techniques to deal with security in Spring and discover how to implement unit and integration test strategies.Finally, the book ends by walking you through building a Java client for your RESTful web service, along with some scaling techniques using the new Spring Reactive libraries.

What you will learn

  • Deep dive into the principles behind REST
  • Expose CRUD operations through RESTful endpoints with the Spring Framework
  • Devise response formats and error handling strategies, offering a consistent and flexible structure to simplify integration for service consumers
  • Follow the best approaches for dealing with a service's evolution while maintaining backward compatibility
  • Understand techniques to secure web services
  • Comply with the best ways to test RESTful web services, including tips for load testing
  • Optimise and scale web services using techniques such as caching and clustering

Who This Book Is For

This book is intended for those who want to learn to build RESTful web services with the latest Spring 5.0 Framework. To make best use of the code samples included in the book, you should have a basic knowledge of the Java language. Previous experience with the Spring Framework would also help you get up and running quickly.


了解如何使用Spring 5.0框架在Java中實現REST架構以構建具有彈性的軟件。

- 遵循最佳實踐,探索技術,如集群和緩存,以實現反應式、可擴展的Web服務。
- 利用Spring框架快速實現RESTful端點。
- 學習使用Spring框架和新的前端框架實現RESTful Web服務的客戶端庫。

REST是一種應對構建可擴展Web服務的挑戰的架構風格。在當今互聯世界中,API在Web上扮演著核心角色。API提供系統互動的基礎,而REST已成為API的代名詞。Spring的深度、廣度和易用性使其成為Java生態系統中最具吸引力的框架之一。因此,將這兩種技術結合起來是一個非常自然的選擇。本書將帶您深入了解RESTful Web服務的設計並利用Spring框架來實現這些服務。從REST背後的哲學基礎開始,您將進行設計和實現企業級RESTful Web服務的步驟。每一章都提供了您可以應用於自己情況的代碼示例。第二版展示了最新的Spring 5.0版本的功能,包括內置的MVC和前端框架。然後,它超越了Spring的使用,探討了處理彈性、安全性和可擴展性問題的方法。使用新的HTTP 2.0標準來提高應用程序的性能。您將學習處理Spring中的安全性的技巧,並了解如何實施單元和集成測試策略。最後,本書將引導您通過使用新的Spring Reactive庫來構建Java客戶端,以及一些應用於RESTful Web服務的擴展技術。

- 深入研究REST背後的原則。
- 通過Spring框架的RESTful端點公開CRUD操作。
- 設計響應格式和錯誤處理策略,提供一致且靈活的結構,以簡化服務消費者的集成。
- 遵循處理服務演進的最佳方法,同時保持向後兼容性。
- 瞭解保護Web服務的技術。
- 遵循測試RESTful Web服務的最佳方法,包括負載測試的技巧。
- 使用緩存和集群等技術優化和擴展Web服務。

本書適合對使用最新的Spring 5.0框架構建RESTful Web服務感興趣的讀者。為了更好地使用書中包含的代碼示例,您應該具備基本的Java語言知識。有Spring框架的先前經驗也將有助於您快速上手。