Spring Boot 2.0 cookbook configure, test, extend, deploy, and monitor your Spring Boot application both outside and inside the cloud

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 stand-alone, production-grade Spring-based applications. This practical guide makes the e...

Full description

Bibliographic Details
Main Author: Antonov, Alex
Format: eBook
Language:English
Published: Birmingham, UK Packt Publishing 2018
Edition:Second edition
Subjects:
Online Access:
Collection: O'Reilly - Collection details see MPG.ReNa
Table of Contents:
  • Understanding Spring Boot autoconfiguration
  • How to do it...
  • How it works...
  • Creating a custom Spring Boot autoconfiguration starter
  • How to do it...
  • How it works...
  • Configuring custom conditional bean instantiations
  • How to do it...
  • How it works...
  • Using custom @Enable annotations to toggle configuration
  • How to do it...
  • How it works...
  • Chapter 5: Application Testing
  • Introduction
  • Creating tests for MVC controllers
  • How to do it...
  • How it works...
  • Configuring a database schema and populating it
  • How to do it...
  • How it works...
  • Initializing the database with Spring JPA and Hibernate
  • Initializing the database with Spring JDBC
  • Creating tests using an in-memory database
  • How to do it...
  • How it works...
  • Creating tests using mock objects
  • How to do it...
  • How it works...
  • Creating a JPA component test
  • How to do it...
  • How it works...
  • Creating a WebMvc component test
  • How to do it...
  • How it works...
  • Writing tests using Cucumber
  • How to do it...
  • How it works...
  • Writing tests using Spock
  • How to do it...
  • How it works...
  • Chapter 6: Application Packaging and Deployment
  • Introduction
  • Creating a Spring Boot executable JAR
  • How to do it...
  • How it works...
  • Creating Docker images
  • How to do it...
  • How it works...
  • Building self-executing binaries
  • Getting ready
  • How to do it...
  • How it works...
  • Spring Boot environment configuration, hierarchy, and precedence
  • How to do it...
  • How it works...
  • Adding a custom PropertySource to the environment using EnvironmentPostProcessor
  • How to do it...
  • How it works...
  • Externalizing an environmental configuration using property files
  • How to do it...
  • How it works...
  • Externalizing an environmental configuration using environment variables
  • How to do it...
  • How it works
  • Externalizing an environmental configuration using Java system properties
  • How to do it...
  • How it works...
  • Externalizing an environmental config using JSON
  • How to do it...
  • How it works...
  • Setting up Consul
  • How to do it...
  • How it works...
  • Externalizing an environmental config using Consul and envconsul
  • Getting ready
  • How to do it...
  • How it works...
  • Chapter 7: Health Monitoring and Data Visualization
  • Introduction
  • Writing custom health indicators
  • How to do it...
  • How it works...
  • Configuring management context
  • How to do it...
  • How it works...
  • Emitting metrics
  • Getting ready
  • How to do it...
  • How it works...
  • Monitoring Spring Boot via JMX
  • Getting ready
  • How to do it...
  • How it works...
  • Managing Spring Boot via SSHd Shell and writing custom remote Shell commands
  • How to do it...
  • How it works...
  • Integrating Micrometer metrics with Graphite
  • Getting ready
  • How to do it...
  • How it works...
  • Integrating Micrometer metrics with Dashing
  • Getting ready
  • How to do it...
  • How it works...
  • Chapter 8: Spring Boot DevTools
  • Introduction
  • Adding Spring Boot DevTools to a project
  • How to do it...
  • How it works...
  • Configuring LiveReload
  • How to do it...
  • How it works...
  • Configuring dynamic application restart triggers
  • How to do it...
  • How it works...
  • Using Remote Update
  • How to do it...
  • How it works...
  • Chapter 9: Spring Cloud
  • Introduction
  • Getting started with Spring Cloud
  • How to do it...
  • How it works...
  • Service discovery using Spring Cloud Consul
  • How to do it...
  • How it works...
  • Using Spring Cloud Netflix - Feign
  • How to do it...
  • How it works...
  • Service discovery using Spring Cloud Netflix - Eureka
  • How to do it...
  • How it works...
  • Using Spring Cloud Netflix - Hystrix
  • How to do it
  • Cover
  • Title Page
  • Copyright and Credits
  • Dedication
  • Packt Upsell
  • Contributors
  • Table of Contents
  • Preface
  • Chapter 1: Getting Started with Spring Boot
  • Introduction
  • Using a Spring Boot template and starter
  • How to do it...
  • How it works...
  • Creating a simple application
  • How to do it...
  • How it works...
  • Launching an application using Gradle
  • How to do it...
  • How it works...
  • Using the command-line runners
  • How to do it...
  • How it works...
  • Setting up a database connection
  • Getting ready
  • How to do it...
  • How it works...
  • Setting up a data repository service
  • How to do it...
  • How it works...
  • Scheduling executors
  • Getting ready
  • How to do it...
  • How it works...
  • Chapter 2: Configuring Web Applications
  • Creating a basic RESTful application
  • How to do it...
  • How it works...
  • Creating Spring Data REST service
  • How to do it...
  • How it works...
  • Configuring custom servlet filters
  • How to do it...
  • How it works...
  • Configuring custom interceptors
  • How to do it...
  • How it works...
  • Configuring custom HttpMessageConverters
  • How to do it...
  • How it works...
  • Configuring custom PropertyEditors
  • How to do it...
  • How it works...
  • Configuring custom type formatters
  • How to do it...
  • How it works...
  • Chapter 3: Web Framework Behavior Tuning
  • Introduction
  • Configuring route matching patterns
  • How to do it...
  • How it works...
  • Configuring custom static path mappings
  • How to do it...
  • How it works...
  • Tuning Tomcat via ServletWebServerFactory
  • How to do it...
  • How it works...
  • Choosing embedded servlet containers
  • How to do it...
  • How it works...
  • Adding custom connectors
  • Getting ready
  • How to do it...
  • How it works...
  • Chapter 4: Writing Custom Spring Boot Starters
  • Introduction
  • How it works...
  • Other Books You May Enjoy
  • Index