
Spring 5.0 Cookbook
Description
Alles über E-Books | Antworten auf Fragen rund um E-Books, Kopierschutz und Dateiformate finden Sie in unserem Info- & Hilfebereich.
More details
Other editions
Additional editions

Person
Sherwin John C. Tragura is currently a subject matter expert and technical consultant in a company in the Philippines. He has been part of many development teams customizing Alfresco DMS/RMS and building Java and Python standalone and web projects. He is also a certified professional and bootcamp technical trainer who has delivered technical training on Java, Jakarta EE, C#, .NET, Python, Node frameworks, and other customized training courses since 2011. He was also associated as a lecturer with the Dela Salle University-Manila, Colegio de San Juan de Letran-Calamba, and the University of the Philippines-Los Banos. He is the author of other Packt books, including Spring MVC Blueprints, Spring 5 Cookbook, and Building Python Microservices with FastAPI.
Content
- Cover
- Copyright
- Credits
- About the Author
- About the Reviewer
- www.PacktPub.com
- Customer Feedback
- Table of Contents
- Preface
- Chapter 1: Getting Started with Spring
- Installing Java Development Kit 1.8
- Getting started
- How to do it...
- How it works...
- Installing Tomcat 9 and configuring HTTP/2
- Getting started
- How to do it...
- How it works...
- Installing STS Eclipse 3.8 IDE
- Getting started
- How to do it...
- How it works...
- Creating Eclipse projects using Maven
- Getting started
- How to do it...
- How it works...
- Creating Spring STS Eclipse projects using Gradle
- Getting started
- How to do it...
- How it works...
- Deploying Spring projects using Maven
- Getting started
- How to do it...
- How it works...
- Deploying Spring projects using Gradle
- Getting started
- How to do it...
- How it works...
- Installing the MySQL 5.7 database server
- Getting started
- How to do it...
- How it works...
- Installing the MongoDB 3.2 database server
- Getting started
- How to do it...
- How it works...
- Chapter 2: Learning Dependency Injection (DI)
- Implementing a Spring container using XML
- Getting started
- How to do it...
- How it works...
- Implementing a Spring container using JavaConfig
- Getting started
- How to do it...
- How it works...
- Managing beans in an XML-based container
- Getting started
- How to do it...
- How it works...
- Managing beans in the JavaConfig container
- Getting started
- How to do it...
- How it works...
- Creating Singleton and Prototype beans
- Getting started
- How to do it...
- How it works...
- Defining eager and lazy spring beans
- Getting started
- How to do it...
- How it works...
- Creating an inner bean
- Getting started
- How to do it...
- How it works...
- Injecting Collections and Properties
- Getting started
- How to do it...
- How it works...
- Creating a Spring MVC using an XML-based approach
- Getting started
- How to do it...
- How it works...
- Creating a Spring MVC using the JavaConfig approach
- Getting started
- How to do it...
- How it works...
- Generating multiple ApplicationContexts
- Getting started
- How to do it...
- How it works...
- Using ResourceBundleMessageSource for Views
- Getting started
- How to do it...
- How it works...
- Chapter 3: Implementing MVC Design Patterns
- Creating the simple @Controller
- Getting started
- How to do it...
- How it works...
- Creating a simple @Controller with method-level URL mapping
- Getting started
- How to do it...
- How it works...
- Designing a simple form @Controller
- Getting started
- How to do it...
- How it works...
- Creating a multi-action @Controller
- Getting started
- How to do it...
- How it works...
- Form validation and parameter type conversion
- Getting started
- How to do it...
- How it works...
- Creating request- and session-scoped beans
- Getting started
- How to do it...
- How it works...
- Implementing page redirection and Flash-scoped beans
- Getting started
- How to do it...
- How it works...
- Creating database connection pooling
- Getting started
- How to do it...
- How it works...
- Implementing the DAO layer using the Spring JDBC Framework
- Getting Started
- How to do it...
- How it works...
- Creating a service layer in an MVC application
- Getting started
- How to do it...
- How it works...
- Chapter 4: Securing Spring MVC Applications
- Configuring Spring Security 4.2.2
- Getting started
- How to do it...
- How it works...
- Mapping sessions to channels and ports
- Getting started
- How to do it...
- How it works...
- Customizing the authentication process
- Getting started
- How to do it...
- How it works...
- Implementing authentication filters, login success, and failure handlers
- Getting started
- How to do it...
- How it works...
- Creating user details
- Getting started
- How to do it...
- How it works...
- Generating encrypted passwords
- Getting started
- How to do it...
- How it works...
- Applying Security to MVC methods
- Getting started
- How to do it...
- How it works...
- Creating roles and permissions from the database
- Getting started
- How to do it...
- How it works...
- Managing and storing sessions
- Getting started
- How to do it...
- How it works...
- Solving Cross-Site Request Forgery (CSRF) and session fixation attacks
- Getting started
- How to do it...
- How it works...
- Solving Cross-Site Scripting (XSS) and clickjacking attacks
- Getting started
- How to do it...
- How it works...
- Creating interceptors for login data validation
- Getting started
- How to do it...
- How it works...
- Chapter 5: Cross-Cutting the MVC
- Logging and auditing service methods
- Getting started
- How to do it...
- How it works...
- Managing DAO transactions
- Getting started
- How to do it...
- How it works...
- Monitoring services and request handlers
- Getting started
- How to do it...
- How it works...
- Validating parameters and arguments
- Getting started
- How to do it...
- How it works...
- Managing exceptions
- Getting started
- How to do it...
- How it works...
- Implementing the caching mechanism
- Getting started
- How to do it...
- How it works...
- Intercepting request transactions
- Getting started
- How to do it...
- How it works...
- Implementing user authentication
- Getting started
- How to do it...
- How it works...
- Accessing with restrictions
- Getting started
- How to do it...
- How it works...
- Controlling concurrent user access
- Getting started
- How to do it...
- How it works...
- Implementing a mini-workflow using AOP
- Getting started
- How to do it...
- How it works...
- Chapter 6: Functional Programming
- Implementing lambda expressions using anonymous inner classes
- Getting started
- How to do it...
- How it works...
- Implementing lambda expression using @FunctionInterface
- Getting started
- How to do it...
- How it works...
- Applying the built-in functional interfaces
- Getting started
- How to do it...
- How it works...
- Applying method and constructor references
- Getting started
- How to do it...
- How it works...
- Using the Stream API
- Getting started
- How to do it...
- How it works...
- Applying streams to collections
- Getting started
- How to do it...
- How it works...
- Applying streams to NIO 2.0
- Getting started
- How to do it...
- How it works...
- Using parallel streams
- Getting started
- How to do it...
- How it works...
- Chapter 7: Reactive Programming
- Applying the observer design pattern using Reactive Streams
- Getting started
- How to do it...
- How it works...
- Creating Mono&T& and Flux&T& publishers
- Getting started
- How to do it...
- How it works...
- Implementing the Subscriber&T& interface
- Getting ready
- How to do it...
- How it works...
- Applying backpressure to Mono&T& and Flux&T&
- Getting ready
- How to do it...
- How it works...
- Managing task executions using Schedulers
- Getting ready
- How to do it...
- How it works...
- Creating concurrent and parallel emissions
- Getting ready
- How to do it...
- How it works...
- Managing continuous data emission
- Getting ready
- How to do it...
- How it works...
- Implementing Stream manipulation and transformation
- Getting ready
- How to do it...
- How it works...
- Testing Reactive data transactions
- Getting ready
- How to do it...
- How it works...
- Implementing Reactive events using RxJava 2.x
- Getting ready
- How to do it...
- How it works...
- Chapter 8: Reactive Web Applications
- Configuring the TaskExecutor
- Getting started
- How to do it...
- How it works...
- SimpleAsyncTaskExecutor
- ThreadPoolTaskExecutor
- ConcurrentTaskExecutor
- Implementing @Async services
- Getting started
- How to do it...
- How it works...
- Creating asynchronous controllers
- Getting started
- How to do it...
- How it works...
- Creating @Scheduled services
- Getting started
- How to do it...
- How it works...
- Using Future&T& and CallableFuture&T&
- Getting started
- How to do it...
- How it works...
- Using Mono&T& and Flux&T& publishers for services
- Getting started
- How to do it...
- How it works...
- Creating Mono&T& and Flux&T& HTTP response
- Getting started
- How to do it...
- How it works...
- Integrating RxJava 2.0
- Getting started
- How to do it...
- How it works...
- Using FreeMarker to render Publisher&T& stream
- Getting started
- How to do it...
- How it works...
- Using Thymeleaf to render a Publisher&T& stream
- Getting started
- How to do it...
- How it works...
- Applying security on TaskExecutors
- Getting started
- How to do it...
- How it works...
- Chapter 9: Spring Boot 2.0
- Building a non-reactive Spring MVC application
- Getting started
- How to do it...
- How it works...
- Configuring Logging
- Getting started
- How to do it...
- How it works...
- Adding JDBC Connectivity
- Getting started
- How to do it...
- How it works...
- Building a reactive Spring MVC application
- Getting started
- How to do it...
- How it works...
- Configuring Spring Security 5.x
- Getting started
- How to do it...
- How it works...
- Using reactive view resolvers
- Getting started
- How to do it...
- How it works...
- Using RouterFunction and HandlerFunction
- Getting started
- How to do it...
- How it works...
- Implementing Spring Data with JPA
- Getting started
- How to do it...
- How it works...
- Implementing REST services using @RestController and Spring REST
- Getting started
- How to do it...
- How it works...
- Applying Spring Cache
- Getting started
- How to do it...
- How it works...
- Chapter 10: The Microservices
- Exposing RESTful services in Spring 5
- Getting started
- How to do it...
- How it works...
- Using the actuator REST endpoints
- Getting started
- How to do it...
- How it works...
- Building a client-side application with RestTemplate, AsyncRestTemplate and, WebClient
- Getting started
- How to do it...
- How it works...
- Configuring the Eureka server for service registration
- Getting started
- How to do it...
- How it works...
- Implementing the Eureka service discovery and client-side load balancing
- Getting started
- How to do it...
- How it works...
- Applying resiliency to client applications
- Getting started
- How to do it...
- How it works...
- Consuming endpoints using a declarative method
- Getting started
- How to do it...
- How it works...
- Using Docker for deployment
- Getting started
- How to do it...
- How it works...
- Chapter 11: Batch and Message-Driven Processes
- Building synchronous batch processes
- Getting started
- How to do it...
- How it works...
- Implementing batch processes with a database
- Getting started
- How to do it...
- How it works...
- Constructing asynchronous batch processes
- Getting started
- How to do it...
- How it works...
- Building synchronous interprocess communication using AMQP
- Getting started
- How to do it...
- How it works...
- Creating asynchronous send-receive communication
- Getting started
- How to do it...
- How it works...
- Creating an event-driven asynchronous communication using AMQP
- Getting started
- How to do it...
- How it works...
- Creating stream communication with Spring Cloud Stream
- Getting started
- How to do it...
- How it works...
- Implementing batch processes using Spring Cloud Task
- Getting started
- How to do it...
- How it works...
- Chapter 12: Other Spring 5 Features
- Using Hibernate 5 object-relational mapping
- Getting ready
- How to do it...
- How it works...
- Applying Hazelcast distributed caching
- Getting ready
- How to do it...
- How it works...
- Building client-server communications with WebSocket
- Getting ready
- How to do it...
- How it works...
- Implementing Reactive WebSocket communication
- Getting ready
- How to do it...
- How it works...
- Implementing asynchronous Spring Data JPA properties
- Getting ready
- How to do it...
- How it works...
- Implementing Reactive Spring Data JPA repositories
- Getting ready
- How to do it...
- How it works...
- Using Spring Data MongoDB
- Getting ready
- How to do it...
- How it works...
- Building applications for big data storage
- Getting ready
- How to do it...
- How it works...
- Building a Spring 5 application using Kotlin
- Getting ready
- How to do it...
- How it works...
- Chapter 13: Testing Spring 5 Components
- Creating tests for Spring MVC components
- Getting ready
- How to do it...
- How it works...
- Building standalone controller tests
- Getting ready
- How to do it...
- How it works...
- Creating tests for DAO and service layers
- Getting ready
- How to do it...
- How it works...
- Creating tests on secured applications
- Getting ready
- How to do it...
- How it works...
- Creating tests using Spring Boot 2.0
- Getting ready
- How to do it...
- How it works...
- Creating tests for Spring Data JPA
- Getting ready
- How to do it...
- How it works...
- Building tests for blocking, asynchronous and reactive RESTful services
- Getting ready
- How to do it...
- How it works...
- Building tests for Kotlin components
- Getting ready
- How to do it...
- How it works...
- Index
System requirements
File format: ePUB
Copy protection: Adobe-DRM (Digital Rights Management)
System requirements:
- Computer (Windows; MacOS X; Linux): Install the free reader Adobe Digital Editions prior to download (see eBook Help).
- Tablet/smartphone (Android; iOS): Install the free app Adobe Digital Editions or the app PocketBook before downloading (see eBook Help).
- E-reader: Bookeen, Kobo, Pocketbook, Sony, Tolino and many more (not Kindle).
The file format ePub works well for novels and non-fiction books – i.e., „flowing” text without complex layout. On an e-reader or smartphone, line and page breaks automatically adjust to fit the small displays.
This eBook uses Adobe-DRM, a „hard” copy protection. If the necessary requirements are not met, unfortunately you will not be able to open the eBook. You will therefore need to prepare your reading hardware before downloading.
Please note: We strongly recommend that you authorise using your personal Adobe ID after installation of any reading software.
For more information, see our ebook Help page.