Book description
Go beyond the basics with Spring Boot! This practical guide presents dozens of relevant scenarios in a convenient problem-solution-discussion format.In Spring Boot in Practice you will learn:
- Spring Boot’s features from an expert’s perspective
- Configuring, logging, and monitoring Spring Boot applications
- Effective methods for database communication
- Utilizing Spring Security and securing your Spring application in production
- Designing and developing microservices and RESTful APIs with Spring Boot
- Microservice versioning, documentation, and security
- Reactive application development and reactive data access with WebSocket and RSocket
- Deploying Spring Boot applications on Kubernetes and major cloud platforms
- Implementing containerization in a Spring Boot application
- Using Spring Boot with Kotlin and GraalVM
Spring Boot in Practice is full of practical recipes for common development problems in Spring Boot. Author Somnath Musib has spent years building applications with Spring, and he shares that extensive experience in this focused guide. You’ll master techniques for using Spring Data, Spring Security, and other Spring-centric solutions. Learn how to work with Spring Boot and Kotlin, handling connections for multiple platforms, and how Spring Boot can simplify building microservices and APIs. Each recipe is built around a real-world problem, complete with a full solution and thoughtful discussion.
About the Technology
With Spring Boot, it’s a snap to create standalone Spring applications that require minimal manual setup. Spring Boot directly embeds a server like Tomcat or Jetty into your project and preconfigures core Spring settings, third-party libraries, security, and other key elements. It’s a big framework, with lots of powerful features. This book provides a rich collection of techniques to help you get the most out of Spring Boot.
About the Book
Spring Boot in Practice is a cookbook-style guide to Spring application development. Following a convenient Problem-Solution-Discussion format, it takes you technique-by-technique through Spring Boot fundamentals. You’ll dive deep into auto-configuration, security, microservices, and more. Along the way, you’ll also discover numerous advanced and hidden features. All the book’s source code is open source, so you can integrate the detailed samples into your own projects.
What's Inside
- Instantly useful techniques with reusable source code
- Configuring, logging, and monitoring Spring Boot applications
- Effective methods for database communication
- Securing Spring applications in production
- Microservices and RESTful APIs
About the Reader
For Spring Boot beginners with some Spring experience.
About the Author
Somnath Musib has over a decade of development experience, and has been actively working with Spring Boot since 2015.
Quotes
Your reliable guide to Spring…Somnath Musib does a great job, and his expert guidance makes it easy to focus on the journey that matters: the journey to production.
- Josh Long, Spring Developer Advocate, Tanzu, a division of VMWare
A–Z guide for Spring Boot.
- Najeeb Arif, Thoughtworks
Hands-on recipes and best practices that help you build applications faster.
- João Miguel Pires Dias, Mercedes-Benz.io
Invaluable for creating robust API frameworks rapidly and leveraging microservice best practices.
- Lachman Dhalliwal, Netcompany
Publisher resources
Table of contents
- Spring Boot in Practice
- Copyright
- dedication
- brief contents
- contents
- front matter
- Part 1.
- 1 Booting Spring Boot
- Part 2.
- 2 Common Spring Boot tasks
-
3 Database access with Spring Data
- 3.1 Introducing Spring Data
- 3.2 Configuring a database in a Spring Boot application
- 3.3 Understanding the CrudRepository interface
-
3.4 Retrieve data from a database using Spring Data
- 3.4.1 Defining query methods
- 3.4.2 Technique: Defining custom query methods to retrieve domain objects from a relational database with Spring Data JPA
- 3.4.3 Implementing pagination with PagingAndSortingRepository
- 3.4.4 Technique: Using PagingAndSortingRepository interface to paginate and sort the data
- 3.4.5 Specifying query using @NamedQuery
- 3.4.6 Technique: Using a named query to manage domain objects in a relational database with Spring Data JPA
- 3.5 Specifying query using @Query
- 3.6 Using Criteria API with Spring Data JPA
- 3.7 Using QueryDSL with Spring Data JPA
- 3.8 Managing domain object relationships
- Summary
-
4 Spring Boot: Autoconfiguration and Actuator
- 4.1 Understanding Spring Boot autoconfiguration
- 4.2 Using Spring Boot DevTools
- 4.3 Creating a custom failure analyzer
-
4.4 Spring Boot Actuator
- 4.4.1 Technique: Configuring Spring Boot Actuator in a Spring Boot application
- 4.4.2 Understanding Spring Boot Actuator endpoints
- 4.4.3 Managing Spring Boot Actuator endpoints
- 4.4.4 Health endpoint deep dive
- 4.4.5 Creating a custom Spring Boot HealthIndicator
- 4.4.6 Technique: Defining a custom Spring Boot actuator HealthIndicator
- 4.5 Info endpoint deep dive
- 4.6 Creating a custom Spring Boot Actuator endpoint
- Summary
-
5 Securing Spring Boot applications
- 5.1 Introducing Spring Security
- 5.2 Hello Spring Security with Spring Boot
-
5.3 Using Spring Security
- 5.3.1 Technique: Customizing the default Spring Security login page of a Spring Boot application
- 5.3.2 Technique: Configuring in-memory authentication with custom users in Spring Security in a Spring Boot application
- 5.3.3 Technique: Configuring JDBC authentication with Spring Security in a Spring Boot application
- 5.3.4 Technique: Implementing JDBC authentication with custom UserDetailsService in a Spring Boot application
- 5.3.5 Technique: Implementing LDAP authentication in a Spring Boot application
- 5.3.6 Technique: Implementing HTTP basic authentication in a Spring Boot application
- Summary
-
6 Implementing additional security with Spring Security
- 6.1 Enabling HTTPS in a Spring Boot application
- 6.2 Securing secrets in Spring Cloud Vault
- 6.3 Implementing user registration
- 6.4 Implementing email verification at user registration
- 6.5 Controlling multiple incorrect login attempts
- 6.6 Implementing a Remember Me feature
- 6.7 Implementing reCAPTCHA
- 6.8 Enabling two-factor authentication with Google Authenticator
- 6.9 Authentication with OAuth2
- 6.10 Securing Actuator endpoints
- Summary
- 7 Developing RESTful Web services with Spring Boot
- Part 3.
- 8 Reactive Spring Boot application development
- Part 4.
-
9 Deploying Spring Boot applications
- 9.1 Running Spring Boot applications as executable JAR files
- 9.2 Deploying Spring Boot applications as WAR in the WildFly application server
- 9.3 Deploying Spring Boot applications in Cloud Foundry
- 9.4 Deploying Spring Boot applications in Heroku
- 9.5 Running Spring Boot applications as Docker containers
- 9.6 Deploying Spring Boot applications in a Kubernetes cluster
- 9.7 Deploying Spring Boot applications in Red Hat OpenShift
- Summary
- Part 5.
- 10 Spring Boot with Kotlin, Native Image, and GraphQL
-
Appendix A. Generating and building Spring Boot projects
-
A.1 Generating Spring Boot applications with Spring Initializr
- A.1.1 Introducing Spring Initializr
- A.1.2 Technique: Generating a Spring Boot application with the Spring Initializr Web user interface
- A.1.3 Technique: Generating a Spring Boot application with Spring Initializr in IntelliJ IDEA IDE
- A.1.4 Technique: Generating a Spring Boot Application with Spring Initializr using the Spring Tool Suite
- A.1.5 Technique: Generating a Spring application with Spring Initializr in Visual Studio Code
- A.1.6 Technique: Generating a Spring Boot application with Spring Initializr using Command Line Interface
- A.2 Bootstrapping and executing a Spring Boot application with Spring Boot CLI
-
A.1 Generating Spring Boot applications with Spring Initializr
- Appendix B. Spring MVC and Thymeleaf Template Engine
- index
Product information
- Title: Spring Boot in Practice
- Author(s):
- Release date: August 2022
- Publisher(s): Manning Publications
- ISBN: 9781617298813
You might also like
book
Spring Boot in Action
A developer-focused guide to writing applications using Spring Boot. You'll learn how to bypass the tedious …
book
Spring Boot: Up and Running
With over 75 million downloads per month, Spring Boot is the most widely used Java framework …
book
Microservices with Spring Boot 3 and Spring Cloud - Third Edition
Create and deploy production-grade microservices-based applications with this latest edition updated to Spring Boot 3, Java …
video
Building Microservices with Spring Boot, Second Edition
7+ Hours of Video Instruction The term “microservices” has gained significant traction over the last few …