更新时间:2021-07-16 19:45:03
coverpage
Spring Boot Cookbook
Credits
About the Author
Acknowledgment
About the Reviewers
www.PacktPub.com
Support files eBooks discount offers and more
Preface
What this book covers
What you need for this book
Who this book is for
Conventions
Reader feedback
Customer support
Chapter 1. Getting Started with Spring Boot
Introduction
Using a Spring Boot template and starters
Creating a simple application
Launching an application using Gradle
Using the command-line runners
Setting up a database connection
Setting up a data repository service
Scheduling executors
Chapter 2. Configuring Web Applications
Creating a basic RESTful application
Creating a Spring Data REST service
Configuring custom servlet filters
Configuring custom interceptors
Configuring custom HttpMessageConverters
Configuring custom PropertyEditors
Configuring custom type Formatters
Chapter 3. Web Framework Behavior Tuning
Configuring route matching patterns
Configuring custom static path mappings
Tuning Tomcat via EmbeddedServletContainerCustomizer
Choosing embedded servlet containers
Adding custom connectors
Chapter 4. Writing Custom Spring Boot Starters
Understanding Spring Boot autoconfiguration
Creating a custom Spring Boot autoconfiguration starter
Configuring custom conditional bean instantiations
Using custom @Enable* annotations to toggle configurations
Chapter 5. Application Testing
Creating tests for Spring MVC Controllers
Automatically configuring the database schema and populating it with data
Creating tests using in-memory database with data fixtures
Creating tests using Mockito to mock DB
Writing tests using Cucumber
Writing tests using Spock
Chapter 6. Application Packaging and Deployment
Creating a Spring Boot executable JAR
Creating Docker images
Building self-executing binaries
Spring Boot environment config hierarchy and precedence
Externalizing environmental config using property files
Externalizing environmental config using environment variables
Externalizing environmental config using Java system properties
Setting up Consul
Externalizing environmental config using Consul and envconsul
Chapter 7. Health Monitoring and Data Visualization
Writing custom health indicators
Emitting metrics
Monitoring Spring Boot via JMX
Management of Spring Boot via CRaSH and writing custom remote shell commands
Integrating Codahale/Dropwizard metrics with Graphite
Integrating Codahale/Dropwizard metrics with Dashing
Index