Building RESTful Web Services with Spring 5 : Leverage the power of Spring 5.0, Java SE 9, and Spring Boot 2.0.
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...
Clasificación: | Libro Electrónico |
---|---|
Autor principal: | |
Otros Autores: | |
Formato: | Electrónico eBook |
Idioma: | Inglés |
Publicado: |
Birmingham :
Packt Publishing,
2018.
|
Edición: | 2nd ed. |
Temas: | |
Acceso en línea: | Texto completo |
Tabla de Contenidos:
- Cover; Title Page; Copyright and Credits; Packt Upsell; Contributors; Table of Contents; Preface; Chapter 1: A Few Basics; REST â#x80;#x93; a basic understanding; Uniform interface; Client and server; Stateless; Cacheable; Layered system; Code on demand (COD); More on REST; Imperative and Reactive programming; Reactive Streams; Benefits of Reactive programming; Reactive programming in Java and Spring 5; Our RESTful web service architecture; Summary; Chapter 2: Building RESTful Web Services in Spring 5 with Maven; Apache Maven; Creating a project with Maven; Viewing a POM file after creating a project.
- POM file structureUnderstanding POM dependencies; Adding Log4j 2.9.1 to POM dependency; Dependency trees; Spring Boot; Developing RESTful web services; Creating a project base; Working with your favorite IDE; Summary; Chapter 3: Flux and Mono (Reactor Support) in Spring; Benefits of Reactive programming; Reactive Core and Streams; Back pressures and Reactive Streams; WebFlux; Basic REST API; Flux; Mono; User class with Reactive â#x80;#x93; REST; Summary; Chapter 4: CRUD Operations in Spring REST; CRUD operations in Spring RESTÂ ; HTTP methods; Reactive server initialization.
- Sample values in the repositorygetAllUsers â#x80;#x93; mapping; getAllUsers â#x80;#x93; implementation in the handler and repository; Testing the endpoint â#x80;#x93; getAllUsers; getUser â#x80;#x93; implementation in the handler and repository; Testing the endpoint â#x80;#x93; getUser; createUser â#x80;#x93; implementation in the handler and repository; Testing the endpoint â#x80;#x93; createUser; updateUser â#x80;#x93; implementation in the handler and repository; Testing the endpoint â#x80;#x93; updateUser; deleteUser â#x80;#x93; implementation in the handler and repository; Testing the endpoint â#x80;#x93; deleteUser; Summary.
- Chapter 5: CRUD Operations in Plain REST (Without Reactive) and File UploadMapping CRUD operations to HTTP methods; Creating resources; CRUD operation in Spring 5 (without Reactive); getAllUsers â#x80;#x93; implementation; getUser â#x80;#x93; implementation; createUser â#x80;#x93; implementation; updateUser â#x80;#x93; implementation; deleteUser â#x80;#x93; implementation; File uploads â#x80;#x93; REST API; Testing the file upload; Summary; Chapter 6: Spring Security and JWT (JSON Web Token); Spring Security; Authentication and authorization; JSON Web Token (JWT); JWT dependency; Creating a JWT token; Generating a token.
- Getting a subject from a JWT tokenGetting a subject from a token; Summary; Chapter 7: Testing RESTful Web Services; JUnit; MockMvc; Testing a single user; Postman; Getting all the users â#x80;#x93; Postman; Adding a user â#x80;#x93; Postman; Generating a JWT â#x80;#x93; Postman; Getting the subject from the token; SoapUI; Getting all the users â#x80;#x93; SoapUI; Generating JWT SoapUI; Getting the subject from the token â#x80;#x93; SoapUI; jsoup; Getting a user â#x80;#x93; jsoup; Adding a user â#x80;#x93; jsoup; Running the test cases; Summary; Chapter 8: Performance; HTTP compression; Content negotiation; Accept-Encoding; Content-Encoding.