Muutke küpsiste eelistusi

Spring REST: Building Java Microservices and Cloud Applications 2nd ed. [Pehme köide]

  • Formaat: Paperback / softback, 243 pages, kõrgus x laius: 254x178 mm, kaal: 507 g, 67 Illustrations, black and white; XVII, 243 p. 67 illus., 1 Paperback / softback
  • Ilmumisaeg: 28-Nov-2021
  • Kirjastus: APress
  • ISBN-10: 1484274768
  • ISBN-13: 9781484274767
  • Pehme köide
  • Hind: 34,80 €*
  • * hind on lõplik, st. muud allahindlused enam ei rakendu
  • Tavahind: 40,94 €
  • Säästad 15%
  • Raamatu kohalejõudmiseks kirjastusest kulub orienteeruvalt 2-4 nädalat
  • Kogus:
  • Lisa ostukorvi
  • Tasuta tarne
  • Tellimisaeg 2-4 nädalat
  • Lisa soovinimekirja
  • Formaat: Paperback / softback, 243 pages, kõrgus x laius: 254x178 mm, kaal: 507 g, 67 Illustrations, black and white; XVII, 243 p. 67 illus., 1 Paperback / softback
  • Ilmumisaeg: 28-Nov-2021
  • Kirjastus: APress
  • ISBN-10: 1484274768
  • ISBN-13: 9781484274767
Design and develop Java-based RESTful APIs using the latest versions of the Spring MVC and Spring Boot frameworks. This book walks you through the process of designing and building a REST application while delving into design principles and best practices for versioning, security, documentation, error handling, paging, and sorting.









Spring REST 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 Will Learn









Build Java-based microservices, native cloud, or any applications using Spring REST Employ Spring MVC and RESTful Spring Build a QuickPoll application example Document REST services, as well as versioning, paging, and sorting Test, handle errors and secure your application









Who This Book Is For





Intermediate Java programmers with at least some prior experience with Spring and web/cloud application development.
About the Authors ix
About the Technical Reviewer xi
Acknowledgments xiii
Introduction xv
Chapter 1 Introduction to REST
1(20)
What Is REST?
1(2)
Understanding Resources
3(1)
Identifying Resources
3(1)
URI Templates
4(1)
Representation
5(1)
HTTP Methods
6(1)
Safety
6(1)
Idempotency
7(1)
GET
7(2)
HEAD
9(1)
DELETE
9(1)
PUT
10(2)
POST
12(1)
PATCH
13(1)
HTTP Status Codes
14(2)
Richardson's Maturity Model
16(1)
Level Zero
17(1)
Level One
17(1)
Level Two
18(1)
Level Three
18(1)
Building a RESTful API
18(1)
Summary
19(2)
Chapter 2 Spring Web MVC Primer
21(24)
Spring Overview
21(2)
Dependency Injection
23(1)
Aspect-Oriented Programming
23(1)
Spring Web MVC Overview
24(1)
Model View Controller Pattern
24(1)
Spring Web MVC Architecture
25(2)
Spring Web MVC Components
27(17)
Summary
44(1)
Chapter 3 RESTful Spring
45(22)
Generating a Spring Boot Project
46(1)
Installing a Build Tool
46(2)
Generating a Project Using start.spring.io
48(8)
Generating a Project Using STS
56(6)
Generating a Project Using the CLI
62(1)
Accessing REST Applications
63(1)
Postman
64(1)
RESTCIient
65(1)
Summary
66(1)
Chapter 4 Beginning QuickPoll Application
67(36)
Introducing QuickPoll
67(2)
Designing QuickPoll
69(1)
Resource Identification
69(2)
Resource Representation
71(3)
Endpoint Identification
74(1)
Action Identification
75(3)
QuickPoll Architecture
78(1)
Implementing QuickPoll
79(3)
Domain Implementation
82(3)
Repository Implementation
85(3)
Embedded Database
88(1)
API Implementation
88(13)
Summary
101(2)
Chapter 5 Error Handling
103(26)
QuickPoll Error Handling
103(4)
Error Responses
107(5)
Input Field Validation
112(9)
Externalizing Error Messages
121(3)
Improving RestExceptionHandler
124(3)
Summary
127(2)
Chapter 6 Documenting REST Services
129(18)
Swagger
130(3)
Integrating Swagger
133(2)
Swagger Ul
135(1)
Customizing Swagger
136(4)
Configuring Controllers
140(5)
Summary
145(2)
Chapter 7 Versioning, Paging, and Sorting
147(22)
Versioning
147(1)
Versioning Approaches
148(2)
Deprecating an API
150(1)
QuickPoll Versioning
151(3)
SwaggerConfig
154(3)
Pagination
157(1)
Page Number Pagination
157(1)
Limit Offset Pagination
158(1)
Cursor-Based Pagination
158(1)
Time-Based Pagination
159(1)
Pagination Data
159(1)
QuickPoll Pagination
160(3)
Changing Default Page Size
163(2)
Sorting
165(1)
Sort Ascending or Sort Descending
165(1)
QuickPoll Sorting
166(1)
Summary
167(2)
Chapter 8 Security
169(30)
Securing REST Services
169(1)
Session-Based Security
170(1)
HTTP Basic Authentication
171(1)
Digest Authentication
172(2)
Certificate-Based Security
174(1)
XAuth
174(2)
OAuth 2.0
176(3)
Spring Security Overview
179(4)
Securing QuickPoll
183(2)
CURL
185(1)
User Infrastructure Setup
185(4)
UserDetailsService Implementation
189(2)
Customizing Spring Security
191(1)
Securing URI
192(5)
Summary
197(2)
Chapter 9 Clients and Testing
199(24)
QuickPoll Java Client
199(2)
RestTemplate
201(1)
Getting Polls
202(3)
Creating a Poll
205(1)
PUT Method
206(1)
DELETE Method
206(1)
Handling Pagination
207(2)
Handling Basic Authentication
209(2)
Testing REST Services
211(1)
Spring Test
211(3)
Unit Testing REST Controllers
214(6)
Integration Testing REST Controllers
220(2)
Summary
222(1)
Chapter 10 HATEOAS
223(14)
HATEOAS
224(3)
JSON Hypermedia Types
227(1)
JSON Hypermedia Types
227(1)
HAL
228(2)
HATEOAS in QuickPoll
230(6)
Summary
236(1)
Index 237
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. Maxim Bartkov is a staff engineer with more than seven years of commercial experience in Java. Maxim specializes in building architecture for high-load systems. He is skilled in the development of Distributed High-Load Systems, Microservice architecture, Spring Framework, System Architecture, and In-Memory Data Grid (IMDG). In his spare time, he writes articles for the Java community.