Learning Spring Boot 2.0 - Second Edition

Use Spring Boot to build lightning-fast apps
Preview in Mapt

Learning Spring Boot 2.0 - Second Edition

Greg L. Turnquist

3 customer reviews
Use Spring Boot to build lightning-fast apps
Mapt Subscription
FREE
$29.99/m after trial
eBook
$25.20
RRP $35.99
Save 29%
Print + eBook
$44.99
RRP $44.99
What do I get with a Mapt Pro subscription?
  • Unlimited access to all Packt’s 5,000+ eBooks and Videos
  • Early Access content, Progress Tracking, and Assessments
  • 1 Free eBook or Video to download and keep every month after trial
What do I get with an eBook?
  • Download this book in EPUB, PDF, MOBI formats
  • DRM FREE - read and interact with your content when you want, where you want, and how you want
  • Access this title in the Mapt reader
What do I get with Print & eBook?
  • Get a paperback copy of the book delivered to you
  • Download this book in EPUB, PDF, MOBI formats
  • DRM FREE - read and interact with your content when you want, where you want, and how you want
  • Access this title in the Mapt reader
What do I get with a Video?
  • Download this Video course in MP4 format
  • DRM FREE - read and interact with your content when you want, where you want, and how you want
  • Access this title in the Mapt reader
$0.00
$25.20
$44.99
$29.99 p/m after trial
RRP $35.99
RRP $44.99
Subscription
eBook
Print + eBook
Start 14 Day Trial

Frequently bought together


Learning Spring Boot 2.0 - Second Edition Book Cover
Learning Spring Boot 2.0 - Second Edition
$ 35.99
$ 25.20
Spring Boot Cookbook - Second Edition Book Cover
Spring Boot Cookbook - Second Edition
$ 35.99
$ 25.20
Buy 2 for $35.00
Save $36.98
Add to Cart

Book Details

ISBN 139781786463784
Paperback370 pages

Book Description

Spring Boot provides a variety of features that address today's business needs along with today's scalable requirements. In this book, you will learn how to leverage powerful databases and Spring Boot's state-of-the-art WebFlux framework. This practical guide will help you get up and running with all the latest features of Spring Boot, especially the new Reactor-based toolkit.

The book starts off by helping you build a simple app, then shows you how to bundle and deploy it to the cloud. From here, we take you through reactive programming, showing you how to interact with controllers and templates and handle data access. Once you're done, you can start writing unit tests, slice tests, embedded container tests, and even autoconfiguration tests.

We go into detail about developer tools, AMQP messaging, WebSockets, security, and deployment. You will learn how to secure your application using both routes and method-based rules. By the end of the book, you'll have built a social media platform from which to apply the lessons you have learned to any problem. If you want a good understanding of building scalable applications using the core functionality of Spring Boot, this is the book for you.

Table of Contents

Chapter 1: Quick Start with Java
Getting started
Spring Boot starters
Running a Spring Boot application
Delving into Spring Boot's property support
Bundling up the application as a runnable JAR file
Deploying to Cloud Foundry
Adding production-ready support
Summary
Chapter 2: Reactive Web with Spring Boot
Creating a reactive web application with Spring Initializr
Learning the tenets of reactive programming
Introducing Reactor types
Switching from Embedded Netty to Apache Tomcat
Comparing reactive Spring WebFlux against classic Spring MVC
Showing some Mono/Flux-based endpoints
Creating a reactive ImageService
Creating a reactive file controller
Why use reactive programming?
Interacting with a Thymeleaf template
Illustrating how going from async to sync can be easy, but the opposite is not
Summary
Chapter 3: Reactive Data Access with Spring Boot
Getting underway with a reactive data store
Solving a problem
Creating a reactive repository
Pulling data through a Mono/Flux and chain of operations
Creating custom finders
Querying by example
Querying with MongoOperations
Logging reactive operations
Summary
Chapter 4: Testing with Spring Boot
Test dependencies
Unit testing
Slice-based testing
Testing WebFlux controllers
Fully embedded Spring Boot app tests
Testing your custom Spring Boot autoconfiguration
Summary
Chapter 5: Developer Tools for Spring Boot Apps
Using Spring Boot's DevTools for hot code reloading
Using Spring Boot's autoconfiguration report
Making local changes and seeing them on the target system
Writing a custom health check
Adding build data to /application/info
Creating custom metrics
Working with additional Actuator endpoints
Summary
Chapter 6: AMQP Messaging with Spring Boot
Getting started with RabbitMQ
Adding messaging as a new component to an existing application
Creating a message producer/message consumer
Adding customized metrics to track message flow
Peeking at Spring Cloud Stream (with RabbitMQ)
Summary
Chapter 7: Microservices with Spring Boot
A quick primer on microservices
Dynamically registering and finding services with Eureka
Introducing @SpringCloudApplication
Calling one microservice from another with client-side load balancing
Implementing microservice circuit breakers
Monitoring circuits
Offloading microservice settings to a configuration server
Summary
Chapter 8: WebSockets with Spring Boot
Publishing saved comments to a chat service
Creating a chat service to handle WebSocket traffic
Consuming WebSocket messages from the web page
Moving to a fully asynchronous web client
Handling AJAX calls on the server
Introducing user chatting
Sending user-specific messages
Checking out the final product
JSR 356 versus Spring WebFlux messaging
Summary
Chapter 9: Securing Your App with Spring Boot
Securing a Spring Boot application
Using Spring Session
Securing the chat microservice
Sharing session details with other microservices
Securing the images microservice
Wiring in image ownership
Tailoring the UI with authorization checks
Securing WebSockets
Tracing calls
Securing the Config Server
Securing the Eureka Server
Summary
Chapter 10: Taking Your App to Production with Spring Boot
Profile-based sets of beans
Creating configuration property beans
Overriding property settings in production
Pushing app to Cloud Foundry and adjusting the settings
Summary

What You Will Learn

  • Create powerful, production-grade applications and services with minimal fuss
  • Support multiple environments with one artifact, and add production-grade support with features 
  • Find out how to tweak your apps through different properties
  • Use custom metrics to track the number of messages published and consumed
  • Enhance the security model of your apps
  • Make use of reactive programming in Spring Boot
  • Build anything from lightweight unit tests to fully running embedded web container integration tests

Authors

Table of Contents

Chapter 1: Quick Start with Java
Getting started
Spring Boot starters
Running a Spring Boot application
Delving into Spring Boot's property support
Bundling up the application as a runnable JAR file
Deploying to Cloud Foundry
Adding production-ready support
Summary
Chapter 2: Reactive Web with Spring Boot
Creating a reactive web application with Spring Initializr
Learning the tenets of reactive programming
Introducing Reactor types
Switching from Embedded Netty to Apache Tomcat
Comparing reactive Spring WebFlux against classic Spring MVC
Showing some Mono/Flux-based endpoints
Creating a reactive ImageService
Creating a reactive file controller
Why use reactive programming?
Interacting with a Thymeleaf template
Illustrating how going from async to sync can be easy, but the opposite is not
Summary
Chapter 3: Reactive Data Access with Spring Boot
Getting underway with a reactive data store
Solving a problem
Creating a reactive repository
Pulling data through a Mono/Flux and chain of operations
Creating custom finders
Querying by example
Querying with MongoOperations
Logging reactive operations
Summary
Chapter 4: Testing with Spring Boot
Test dependencies
Unit testing
Slice-based testing
Testing WebFlux controllers
Fully embedded Spring Boot app tests
Testing your custom Spring Boot autoconfiguration
Summary
Chapter 5: Developer Tools for Spring Boot Apps
Using Spring Boot's DevTools for hot code reloading
Using Spring Boot's autoconfiguration report
Making local changes and seeing them on the target system
Writing a custom health check
Adding build data to /application/info
Creating custom metrics
Working with additional Actuator endpoints
Summary
Chapter 6: AMQP Messaging with Spring Boot
Getting started with RabbitMQ
Adding messaging as a new component to an existing application
Creating a message producer/message consumer
Adding customized metrics to track message flow
Peeking at Spring Cloud Stream (with RabbitMQ)
Summary
Chapter 7: Microservices with Spring Boot
A quick primer on microservices
Dynamically registering and finding services with Eureka
Introducing @SpringCloudApplication
Calling one microservice from another with client-side load balancing
Implementing microservice circuit breakers
Monitoring circuits
Offloading microservice settings to a configuration server
Summary
Chapter 8: WebSockets with Spring Boot
Publishing saved comments to a chat service
Creating a chat service to handle WebSocket traffic
Consuming WebSocket messages from the web page
Moving to a fully asynchronous web client
Handling AJAX calls on the server
Introducing user chatting
Sending user-specific messages
Checking out the final product
JSR 356 versus Spring WebFlux messaging
Summary
Chapter 9: Securing Your App with Spring Boot
Securing a Spring Boot application
Using Spring Session
Securing the chat microservice
Sharing session details with other microservices
Securing the images microservice
Wiring in image ownership
Tailoring the UI with authorization checks
Securing WebSockets
Tracing calls
Securing the Config Server
Securing the Eureka Server
Summary
Chapter 10: Taking Your App to Production with Spring Boot
Profile-based sets of beans
Creating configuration property beans
Overriding property settings in production
Pushing app to Cloud Foundry and adjusting the settings
Summary

Book Details

ISBN 139781786463784
Paperback370 pages
Read More
From 3 reviews

Read More Reviews

Recommended for You

Spring Boot Cookbook - Second Edition Book Cover
Spring Boot Cookbook - Second Edition
$ 35.99
$ 25.20
Learning Spring 5.0 Book Cover
Learning Spring 5.0
$ 39.99
$ 28.00
Mastering Spring 5.0 Book Cover
Mastering Spring 5.0
$ 39.99
$ 28.00
Spring 5.0 Microservices - Second Edition Book Cover
Spring 5.0 Microservices - Second Edition
$ 39.99
$ 28.00
Mastering Microservices with Java Book Cover
Mastering Microservices with Java
$ 35.99
$ 25.20
Spring Microservices Book Cover
Spring Microservices
$ 39.99
$ 28.00