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 for versioning, security, documentation, error handling, paging, and sorting.
This book provides a brief introduction to REST, HTTP, and web infrastructure. You will learn about several Spring projects such as Spring Boot, Spring MVC, Spring Data JPA, and Spring Security and the role they play in simplifying REST application development. You will learn how to build clients that consume REST services. Finally, you will learn how to use the Spring MVC test framework to unit test and integration test your REST API.
After reading this book, you will come away with all the skills to build sophisticated REST applications using Spring technologies.
What you’ll learn
How to build REST applications with Spring technologies
How to identify REST resources and design their representations
How to version REST services
How to document REST services using Swagger
How to handle errors and communicate meaningful messages
How to secure REST services using Basic Auth and OAuth 2.0
How to handle large data sets using pagination
How to build REST clients using RestTemplate
How to test REST services using the Spring MVC test framework
Who this book is for
This book is for enterprise and web developers using Java and Spring and want to build REST applications. The book requires a basic knowledge of Java, Spring and the web, but no prior exposure to REST.