Hands-on Application Development using Spring Boot
Building Modern Cloud Native Applications by Learning RESTFul API, Microservices, CRUD Operations, Unit Testing, and Deployment
Shagun Bakliwal
- English
- ePUB (mobile friendly)
- Available on iOS & Android
Hands-on Application Development using Spring Boot
Building Modern Cloud Native Applications by Learning RESTFul API, Microservices, CRUD Operations, Unit Testing, and Deployment
Shagun Bakliwal
About This Book
A pragmatic guide for Java developers to help build Microservices and Cloud Apps using Spring Boot.
Key Features
? Develops microservices from start to finish using the Spring Boot Framework.
? Creates cloud-native applications using Spring Boot's production-ready features.
? Covers the API gateway, unit testing, cloud deployments, and managing high-traffic applications.
Description
Spring is an excellent framework for developing both web and cloud-native applications. This book on application development using Spring Boot simplifies the process of writing boilerplate code for complex software. It allows developers to concentrate on the application's concept rather than on the internal Java configuration.This book will guide you on how to make the best use of the strength that Spring Boot provides. You'll gain an understanding of how Spring Boot configuration works in conjunction with application development, including auto-configuration and overriding default configurations. You will learn to develop scalable, dependable microservices to accelerate the development lifecycle of a cloud-based application. Each chapter will walk you through the features of Spring Boot as a Software Development Framework, such as performing Create, Read, Update, and Delete (CRUD) operations on a database and securing web services with appropriate logging.By the end of this book, you will develop, test, and deploy applications ready for production and how to establish them as cloud-based applications. The readers will also gain the expertise of writing unit and integration test cases.
What you will learn
? Get to know Spring Boot and all its capabilities.
? Build start-to-end production-ready applications.
? Explore the API Gateway and practice how to run request routing.
? Learn API doc tools like Swagger and host your apps on Cloud.
? Practice how to balance the application's load when the system is under high traffic.
? Learn to write unit tests and integration tests for bug-free coding.
Who this book is for
This book is for Java developers who want to quickly develop, test, and deploy production-ready applications. This book will also appeal to cloud-native application developers and cloud engineers. No prior Spring Boot knowledge is required as the basics are covered in the book.
Table of Contents
1. Getting Started with Spring Boot
2. Developing Your First Spring Boot Application
3. Spring Boot Starter Dependencies and Auto-Configuration
4. Spring Boot Annotations
5. Working with Spring Data JPA and Caching
6. Building RESTFul Microservices
7. Securing a Web Application
8. Building Resilient System
9. Logging
10. Working with the Swagger API Management Tool
11. Testing a Spring Boot Application
12. Deploying a Spring Boot Application
Frequently asked questions
Information
CHAPTER 1
Getting Started with Spring Boot
Structure
- Introduction to Spring Boot
- Features of Spring Boot
- Advantages of Spring Boot
- Breaking the monolithic way of developing software
- When to start using microservices?
- When not to start using microservices?
- System requirements
- Setting up the environment
- The 12-factor app
- Spring Initializr
Objectives
Introduction to Spring Boot
main()
method.Features of Spring Boot
- Faster way of developing applications by reducing the boilerplate configurations.
- Loosely coupled dependencies.
- Starter packs available as part of dependency for simplifying builds and configuration.
- Creating production-ready microservices with actuator health endpoints such as
health
,httptrace
,mappings
,metrics
,info
,configprops
,env,
and so on. - Embedded container server support. By default, Tomcat is used.
- Auto-configuration for dependencies; once the dependency is loaded into the class path, Spring Boot manages the class instantiations, when needed.
- Externalized configurations with the help of
.properties
and.yml
files and Spring Cloud Config. - Live reload for the application during the development phase.
- Ability to exclude/change the dependency version before deployment.
Advantages of Spring Boot
java –jar <jar name>
just like any other Java project that builds a jar
file. The Spring Boot application can also be started by running the mvn spring-boot:run
command on the root directory which contains the src
folder.Breaking the monolithic way of developing software
- Each service can have a single functionality, single data repository.
- Each service is in...