Spring REST
Spring REST is a practical guide for designing and developing RESTful APIs using the Spring Framework. This book walks you through the process of designing and building a REST application while taking a deep dive into design principles and best practices
- PDF / 5,129,793 Bytes
- 195 Pages / 504.06 x 720 pts Page_size
- 107 Downloads / 247 Views
Contents at a Glance About the Authors�������������������������������������������������������������������������������������������������� xiii About the Technical Reviewer���������������������������������������������������������������������������������xv Acknowledgments�������������������������������������������������������������������������������������������������xvii Introduction������������������������������������������������������������������������������������������������������������xix ■Chapter ■ 1: Introduction to REST���������������������������������������������������������������������������� 1 ■Chapter ■ 2: Spring Web MVC Primer��������������������������������������������������������������������� 15 ■Chapter ■ 3: RESTful Spring����������������������������������������������������������������������������������� 31 ■Chapter ■ 4: Beginning QuickPoll Application�������������������������������������������������������� 47 ■Chapter ■ 5: Error Handling������������������������������������������������������������������������������������ 73 ■Chapter ■ 6: Documenting REST Services�������������������������������������������������������������� 91 ■Chapter ■ 7: Versioning, Paging, and Sor ting������������������������������������������������������� 105 ■Chapter ■ 8: Security�������������������������������������������������������������������������������������������� 121 ■Chapter ■ 9: Clients and Testing��������������������������������������������������������������������������� 147 ■Chapter ■ 10: HATEOAS����������������������������������������������������������������������������������������� 165 ■Appendix ■ A: Installing cURL on Windows���������������������������������������������������������� 175 Index��������������������������������������������������������������������������������������������������������������������� 179
v
Introduction Spring REST serves as a practical guide for designing and developing RESTful APIs using the popular Spring Framework. This book begins with a brief introduction to REST, HTTP, and Web infrastructure. It then provides detailed coverage of several Spring portfolio projects such as Spring Boot, Spring MVC, Spring Data JPA, and Spring Security. The book walks through the process of designing and building a REST application while taking a deeper look into design principles and best practices for versioning, security, documentation, error handling, paging, and sorting. It also discusses techniques for building clients that consume REST services. Finally, it covers Spring MVC test frameworks for creating unit and integration tests for REST API. After reading the book, you will have learned: •
About REST fundamentals and Web infrastructure
•
About Spring technologies such as Spring Boot and Spring Data JPA
•
How to build REST applications with Spring technologies
•
How to identify REST resources and design their representations
•
Design principles for versioning REST services
•
How to document REST services using Swagger
•
Strategies for handling errors and comm
Data Loading...