Spring REST

  • 2h 39m
  • Balaji Varanasi, Sudha Belida
  • Apress
  • 2015

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.

About the Authors

Balaji Varanasi is a software development manager and technology entrepreneur. He has over 13 years of experience architecting and developing Java/.Net applications and, more recently, iPhone apps. During this period he has worked in the areas of security, web accessibility, search, and enterprise portals. He has a Master s Degree in Computer Science and serves as adjunct faculty, teaching programming and information system courses. When not programming, he enjoys spending time with his lovely wife in Salt Lake City, Utah.

Sudha Belida is a senior software engineer and technology enthusiast. She has more than seven years of experience working with Java and JEE technologies and frameworks, such as Spring, Hibernate, Struts, and AngularJS. Her interests lie in entrepreneurship and agile methodologies for software design and development. She has a master’s degree in computational science from the University of Utah. In her free time, she likes to travel and enjoy the outdoor environment that Utah has to offer.

In this Book

  • Introduction to REST
  • Spring Web MVC Primer
  • RESTful Spring
  • Beginning QuickPoll Application
  • Error Handling
  • Documenting REST Services
  • Versioning, Paging, and Sorting
  • Security
  • Clients and Testing