Sign In Start Free Trial
Account

Add to playlist

Create a Playlist

Modal Close icon
You need to login to use this feature.
  • Book Overview & Buying Spring Boot 2.0 Cookbook
  • Table Of Contents Toc
  • Feedback & Rating feedback
Spring Boot 2.0 Cookbook

Spring Boot 2.0 Cookbook

By : Antonov
2 (3)
close
close
Spring Boot 2.0 Cookbook

Spring Boot 2.0 Cookbook

2 (3)
By: Antonov

Overview of this book

The Spring framework provides great flexibility for Java development, which also results in tedious configuration work. Spring Boot addresses the configuration difficulties of Spring and makes it easy to create standalone, production-grade Spring-based applications. This practical guide makes the existing development process more efficient. Spring Boot Cookbook 2.0 Second Edition smartly combines all the skills and expertise to efficiently develop, test, deploy, and monitor applications using Spring Boot on premise and in the cloud. We start with an overview of the important Spring Boot features you will learn to create a web application for a RESTful service. Learn to fine-tune the behavior of a web application by learning about custom routes and asset paths and how to modify routing patterns. Address the requirements of a complex enterprise application and cover the creation of custom Spring Boot starters. This book also includes examples of the new and improved facilities available to create various kinds of tests introduced in Spring Boot 1.4 and 2.0, and gain insights into Spring Boot DevTools. Explore the basics of Spring Boot Cloud modules and various Cloud starters to make applications in “Cloud Native” and take advantage of Service Discovery and Circuit Breakers.
Table of Contents (11 chapters)
close
close

What this book covers

Chapter 1, Getting Started with Spring Boot, provides an overview of the important and useful Spring Boot starters that are included in the framework. You will learn how to use spring.io resources, how to get started with a simple project, and how to configure the build file to contain their desired starters. The chapter will finish with creating a simple command-line application configured to execute some scheduled tasks.

Chapter 2, Configuring Web Applications, provides examples of how to create and add custom servlet filters, interceptors, converters, formatters, and PropertyEditors to a Spring Boot web application. It will start by creating a new web application and use it as a base to customize with the components we discuss earlier in the chapter.

Chapter 3, Web Framework Behavior Tuning, delves into fine-tuning the behavior of a web application. It will cover configuring custom routing rules and patterns, adding additional static asset paths, and adding and modifying servlet container connectors and other properties, such as enabling SSL.

Chapter 4, Writing Custom Spring Boot Starters, shows how to create custom Spring Boot starters to provide additional behaviors and functionality that might be required for complex enterprise applications. You will learn about how the autoconfiguration mechanics works under the hood and how to use them to selectively enable/disable default functionality and conditionally load your own.

Chapter 5, Application Testing, explores different techniques for testing Spring Boot applications. It will start by introducing you to testing MVC applications, then proceed with some tips on how to use in-memory databases with pre-populated data to mimic real DB interactions during tests, and conclude with examples of BDD via testing tools such as Cucumber and Spock.

Chapter 6, Application Packaging and Deployment, will cover examples of configuring your build to produce Docker images and self-executing binary files for Linux/OSX environments. We will explore the options for external application configuration using Consul and delve into the details of Spring Boot environment and configuration functionality.

Chapter 7, Health Monitoring and Data Visualization, explores the various mechanisms that Spring Boot provides to help us see data relating to application's health. We will start by learning how to write and expose custom health metrics and see the data using HTTP endpoints and JMX. It will then proceed with the overview and creation of management commands for SSHd and finish with integration of monitoring data with Graphite and Dashing using the Micrometer metrics framework.

Chapter 8, Spring Boot DevTools, provides an insight into how to use Spring Boot DevTools during application development to simplify common tasks of dynamic code recompiling/restarting and remote code updating. We will learn how to add DevTools to the project, followed by exploring how DevTools helps speed up the development process by automatically restarting a running application when code changes take place.

Chapter 9, Spring Cloud, provides examples of various features in Spring Boot Cloud modules. You will learn how to use different cloud modules for service discovery, such as Consul or Netflix Eureka. Later, we will look at how to incorporate Netflix libraries such as the Hystrix circuit breaker and the Feign interface-based REST client.

Unlock full access

Continue reading for free

A Packt free trial gives you instant online access to our library of over 7000 practical eBooks and videos, constantly updated with the latest in tech

Create a Note

Modal Close icon
You need to login to use this feature.
notes
bookmark search playlist font-size

Change the font size

margin-width

Change margin width

day-mode

Change background colour

Close icon Search
Country selected

Close icon Your notes and bookmarks

Delete Bookmark

Modal Close icon
Are you sure you want to delete it?
Cancel
Yes, Delete

Delete Note

Modal Close icon
Are you sure you want to delete it?
Cancel
Yes, Delete

Edit Note

Modal Close icon
Write a note (max 255 characters)
Cancel
Update Note

Confirmation

Modal Close icon
claim successful

Buy this book with your credits?

Modal Close icon
Are you sure you want to buy this book with one of your credits?
Close
YES, BUY