Spring Cloud


Table of Contents

1. Features
I. Cloud Native Applications
2. Spring Cloud Context: Application Context Services
2.1. The Bootstrap Application Context
2.2. Application Context Hierarchies
2.3. Changing the Location of Bootstrap Properties
2.4. Overriding the Values of Remote Properties
2.5. Customizing the Bootstrap Configuration
2.6. Customizing the Bootstrap Property Sources
2.7. Logging Configuration
2.8. Environment Changes
2.9. Refresh Scope
2.10. Encryption and Decryption
2.11. Endpoints
3. Spring Cloud Commons: Common Abstractions
3.1. @EnableDiscoveryClient
3.1.1. Health Indicator
3.1.2. Ordering DiscoveryClient instances
3.2. ServiceRegistry
3.2.1. ServiceRegistry Auto-Registration
ServiceRegistry Auto-Registration Events
3.2.2. Service Registry Actuator Endpoint
3.3. Spring RestTemplate as a Load Balancer Client
3.4. Spring WebClient as a Load Balancer Client
3.4.1. Retrying Failed Requests
3.5. Multiple RestTemplate objects
3.6. Multiple WebClient Objects
3.7. Spring WebFlux WebClient as a Load Balancer Client
3.7.1. Spring WebFlux WebClient with Reactive Load Balancer
3.7.2. Spring WebFlux WebClient with non-reactive Load Balancer Client
3.7.3. Passing your own Load-Balancer Client configuration
3.8. Ignore Network Interfaces
3.9. HTTP Client Factories
3.10. Enabled Features
3.10.1. Feature types
3.10.2. Declaring features
3.11. Spring Cloud Compatibility Verification
II. Spring Cloud Config
4. Quick Start
4.1. Client Side Usage
5. Spring Cloud Config Server
5.1. Environment Repository
5.1.1. Git Backend
Skipping SSL Certificate Validation
Setting HTTP Connection Timeout
Placeholders in Git URI
Pattern Matching and Multiple Repositories
Authentication
Authentication with AWS CodeCommit
Git SSH configuration using properties
Placeholders in Git Search Paths
Force pull in Git Repositories
Deleting untracked branches in Git Repositories
Git Refresh Rate
5.1.2. Version Control Backend Filesystem Use
5.1.3. File System Backend
5.1.4. Vault Backend
Multiple Properties Sources
5.1.5. Accessing Backends Through a Proxy
5.1.6. Sharing Configuration With All Applications
File Based Repositories
Vault Server
CredHub Server
5.1.7. JDBC Backend
5.1.8. CredHub Backend
OAuth 2.0
5.1.9. Composite Environment Repositories
Custom Composite Environment Repositories
5.1.10. Property Overrides
5.2. Health Indicator
5.3. Security
5.4. Encryption and Decryption
5.5. Key Management
5.6. Creating a Key Store for Testing
5.7. Using Multiple Keys and Key Rotation
5.8. Serving Encrypted Properties
6. Serving Alternative Formats
7. Serving Plain Text
8. Embedding the Config Server
9. Push Notifications and Spring Cloud Bus
10. Spring Cloud Config Client
10.1. Config First Bootstrap
10.2. Discovery First Bootstrap
10.3. Config Client Fail Fast
10.4. Config Client Retry
10.5. Locating Remote Configuration Resources
10.6. Specifying Multiple Urls for the Config Server
10.7. Configuring Timeouts
10.8. Security
10.8.1. Health Indicator
10.8.2. Providing A Custom RestTemplate
10.8.3. Vault
10.9. Nested Keys In Vault
III. Spring Cloud Netflix
11. Service Discovery: Eureka Clients
11.1. How to Include Eureka Client
11.2. Registering with Eureka
11.3. Authenticating with the Eureka Server
11.4. Status Page and Health Indicator
11.5. Registering a Secure Application
11.6. Eureka’s Health Checks
11.7. Eureka Metadata for Instances and Clients
11.7.1. Using Eureka on Cloud Foundry
11.7.2. Using Eureka on AWS
11.7.3. Changing the Eureka Instance ID
11.8. Using the EurekaClient
11.8.1. EurekaClient without Jersey
11.9. Alternatives to the Native Netflix EurekaClient
11.10. Why Is It so Slow to Register a Service?
11.11. Zones
11.12. Refreshing Eureka Clients
12. Service Discovery: Eureka Server
12.1. How to Include Eureka Server
12.2. How to Run a Eureka Server
12.3. High Availability, Zones and Regions
12.4. Standalone Mode
12.5. Peer Awareness
12.6. When to Prefer IP Address
12.7. Securing The Eureka Server
12.8. JDK 11 Support
13. Circuit Breaker: Hystrix Clients
13.1. How to Include Hystrix
13.2. Propagating the Security Context or Using Spring Scopes
13.3. Health Indicator
13.4. Hystrix Metrics Stream
14. Circuit Breaker: Hystrix Dashboard
15. Hystrix Timeouts And Ribbon Clients
15.1. How to Include the Hystrix Dashboard
15.2. Turbine
15.2.1. Clusters Endpoint
15.3. Turbine Stream
16. Client Side Load Balancer: Ribbon
16.1. How to Include Ribbon
16.2. Customizing the Ribbon Client
16.3. Customizing the Default for All Ribbon Clients
16.4. Customizing the Ribbon Client by Setting Properties
16.5. Using Ribbon with Eureka
16.6. Example: How to Use Ribbon Without Eureka
16.7. Example: Disable Eureka Use in Ribbon
16.8. Using the Ribbon API Directly
16.9. Caching of Ribbon Configuration
16.10. How to Configure Hystrix Thread Pools
16.11. How to Provide a Key to Ribbon’s IRule
17. External Configuration: Archaius
18. Router and Filter: Zuul
18.1. How to Include Zuul
18.2. Embedded Zuul Reverse Proxy
18.3. Zuul Http Client
18.4. Cookies and Sensitive Headers
18.5. Ignored Headers
18.6. Management Endpoints
18.6.1. Routes Endpoint
18.6.2. Filters Endpoint
18.7. Strangulation Patterns and Local Forwards
18.8. Uploading Files through Zuul
18.9. Query String Encoding
18.10. Request URI Encoding
18.11. Plain Embedded Zuul
18.12. Disable Zuul Filters
18.13. Providing Hystrix Fallbacks For Routes
18.14. Zuul Timeouts
18.15. Rewriting the Location header
18.16. Enabling Cross Origin Requests
18.17. Metrics
18.18. Zuul Developer Guide
18.18.1. The Zuul Servlet
18.18.2. Zuul RequestContext
18.18.3. @EnableZuulProxy vs. @EnableZuulServer
18.18.4. @EnableZuulServer Filters
18.18.5. @EnableZuulProxy Filters
18.18.6. Custom Zuul Filter Examples
How to Write a Pre Filter
How to Write a Route Filter
How to Write a Post Filter
18.18.7. How Zuul Errors Work
18.18.8. Zuul Eager Application Context Loading
19. Polyglot support with Sidecar
20. Retrying Failed Requests
20.1. BackOff Policies
20.2. Configuration
20.2.1. Zuul
21. HTTP Clients
22. Modules In Maintenance Mode
IV. Spring Cloud OpenFeign
23. Declarative REST Client: Feign
23.1. How to Include Feign
23.2. Overriding Feign Defaults
23.3. Creating Feign Clients Manually
23.4. Feign Hystrix Support
23.5. Feign Hystrix Fallbacks
23.6. Feign and @Primary
23.7. Feign Inheritance Support
23.8. Feign request/response compression
23.9. Feign logging
23.10. Feign @QueryMap support
23.11. Troubleshooting
23.11.1. Early Initialization Errors
V. Spring Cloud Stream
24. A Brief History of Spring’s Data Integration Journey
25. Quick Start
25.1. Creating a Sample Application by Using Spring Initializr
25.2. Importing the Project into Your IDE
25.3. Adding a Message Handler, Building, and Running
26. What’s New in 2.0?
26.1. New Features and Components
26.2. Notable Enhancements
26.2.1. Both Actuator and Web Dependencies Are Now Optional
26.2.2. Content-type Negotiation Improvements
26.3. Notable Deprecations
26.3.1. Java Serialization (Java Native and Kryo)
26.3.2. Deprecated Classes and Methods
27. Introducing Spring Cloud Stream
28. Main Concepts
28.1. Application Model
28.1.1. Fat JAR
28.2. The Binder Abstraction
28.3. Persistent Publish-Subscribe Support
28.4. Consumer Groups
28.5. Consumer Types
28.5.1. Durability
28.6. Partitioning Support
29. Programming Model
29.1. Destination Binders
29.2. Destination Bindings
29.3. Producing and Consuming Messages
29.3.1. Spring Integration Support
29.3.2. Using @StreamListener Annotation
29.3.3. Using @StreamListener for Content-based routing
29.3.4. Spring Cloud Function support
Functional Composition
29.3.5. Using Polled Consumers
Overview
Handling Errors
29.4. Error Handling
29.4.1. Application Error Handling
29.4.2. System Error Handling
Drop Failed Messages
DLQ - Dead Letter Queue
Re-queue Failed Messages
29.4.3. Retry Template
29.5. Reactive Programming Support
29.5.1. Reactor-based Handlers
29.5.2. Reactive Sources
30. Binders
30.1. Producers and Consumers
30.2. Binder SPI
30.3. Binder Detection
30.3.1. Classpath Detection
30.4. Multiple Binders on the Classpath
30.5. Connecting to Multiple Systems
30.6. Binding visualization and control
30.7. Binder Configuration Properties
31. Configuration Options
31.1. Binding Service Properties
31.2. Binding Properties
31.2.1. Common Binding Properties
31.2.2. Consumer Properties
31.2.3. Producer Properties
31.3. Using Dynamically Bound Destinations
32. Content Type Negotiation
32.1. Mechanics
32.1.1. Content Type versus Argument Type
32.1.2. Message Converters
32.2. Provided MessageConverters
32.3. User-defined Message Converters
33. Schema Evolution Support
33.1. Schema Registry Client
33.1.1. Schema Registry Client Properties
33.2. Avro Schema Registry Client Message Converters
33.2.1. Avro Schema Registry Message Converter Properties
33.3. Apache Avro Message Converters
33.4. Converters with Schema Support
33.5. Schema Registry Server
33.5.1. Schema Registry Server API
Registering a New Schema
Retrieving an Existing Schema by Subject, Format, and Version
Retrieving an Existing Schema by Subject and Format
Retrieving an Existing Schema by ID
Deleting a Schema by Subject, Format, and Version
Deleting a Schema by ID
Deleting a Schema by Subject
33.5.2. Using Confluent’s Schema Registry
33.6. Schema Registration and Resolution
33.6.1. Schema Registration Process (Serialization)
33.6.2. Schema Resolution Process (Deserialization)
34. Inter-Application Communication
34.1. Connecting Multiple Application Instances
34.2. Instance Index and Instance Count
34.3. Partitioning
34.3.1. Configuring Output Bindings for Partitioning
34.3.2. Configuring Input Bindings for Partitioning
35. Testing
35.1. Disabling the Test Binder Autoconfiguration
36. Health Indicator
37. Metrics Emitter
38. Samples
38.1. Deploying Stream Applications on CloudFoundry
VI. Binder Implementations
39. Apache Kafka Binder
39.1. Usage
39.2. Apache Kafka Binder Overview
39.3. Configuration Options
39.3.1. Kafka Binder Properties
39.3.2. Kafka Consumer Properties
39.3.3. Kafka Producer Properties
39.3.4. Usage examples
Example: Setting autoCommitOffset to false and Relying on Manual Acking
Example: Security Configuration
Example: Pausing and Resuming the Consumer
39.4. Error Channels
39.5. Kafka Metrics
39.6. Dead-Letter Topic Processing
39.7. Partitioning with the Kafka Binder
40. Apache Kafka Streams Binder
40.1. Usage
40.2. Kafka Streams Binder Overview
40.2.1. Streams DSL
40.3. Configuration Options
40.3.1. Kafka Streams Properties
40.3.2. TimeWindow properties:
40.4. Multiple Input Bindings
40.4.1. Multiple Input Bindings as a Sink
40.4.2. Multiple Input Bindings as a Processor
40.5. Multiple Output Bindings (aka Branching)
40.6. Message Conversion
40.6.1. Outbound serialization
40.6.2. Inbound Deserialization
40.7. Error Handling
40.7.1. Handling Deserialization Exceptions
40.7.2. Handling Non-Deserialization Exceptions
40.8. State Store
40.9. Interactive Queries
40.10. Accessing the underlying KafkaStreams object
40.11. State Cleanup
41. RabbitMQ Binder
41.1. Usage
41.2. RabbitMQ Binder Overview
41.3. Configuration Options
41.3.1. RabbitMQ Binder Properties
41.3.2. RabbitMQ Consumer Properties
41.3.3. Advanced Listener Container Configuration
41.3.4. Rabbit Producer Properties
41.4. Retry With the RabbitMQ Binder
41.4.1. Putting it All Together
41.5. Error Channels
41.6. Dead-Letter Queue Processing
41.6.1. Non-Partitioned Destinations
41.6.2. Partitioned Destinations
republishToDlq=false
republishToDlq=true
41.7. Partitioning with the RabbitMQ Binder
VII. Spring Cloud Bus
42. Quick Start
43. Bus Endpoints
43.1. Bus Refresh Endpoint
43.2. Bus Env Endpoint
44. Addressing an Instance
45. Addressing All Instances of a Service
46. Service ID Must Be Unique
47. Customizing the Message Broker
48. Tracing Bus Events
49. Broadcasting Your Own Events
49.1. Registering events in custom packages
VIII. Spring Cloud Sleuth
50. Introduction
50.1. Terminology
50.2. Purpose
50.2.1. Distributed Tracing with Zipkin
50.2.2. Visualizing errors
50.2.3. Distributed Tracing with Brave
50.2.4. Live examples
50.2.5. Log correlation
JSON Logback with Logstash
50.2.6. Propagating Span Context
Baggage versus Span Tags
50.3. Adding Sleuth to the Project
50.3.1. Only Sleuth (log correlation)
50.3.2. Sleuth with Zipkin via HTTP
50.3.3. Sleuth with Zipkin over RabbitMQ or Kafka
50.4. Overriding the auto-configuration of Zipkin
51. Additional Resources
52. Features
52.1. Introduction to Brave
52.1.1. Tracing
52.1.2. Local Tracing
52.1.3. Customizing Spans
52.1.4. Implicitly Looking up the Current Span
52.1.5. RPC tracing
One-Way tracing
53. Sampling
53.1. Declarative sampling
53.2. Custom sampling
53.3. Sampling in Spring Cloud Sleuth
54. Propagation
54.1. Propagating extra fields
54.1.1. Prefixed fields
54.1.2. Extracting a Propagated Context
54.1.3. Sharing span IDs between Client and Server
54.1.4. Implementing Propagation
55. Current Tracing Component
56. Current Span
56.1. Setting a span in scope manually
57. Instrumentation
58. Span lifecycle
58.1. Creating and finishing spans
58.2. Continuing Spans
58.3. Creating a Span with an explicit Parent
59. Naming spans
59.1. @SpanName Annotation
59.2. toString() method
60. Managing Spans with Annotations
60.1. Rationale
60.2. Creating New Spans
60.3. Continuing Spans
60.4. Advanced Tag Setting
60.4.1. Custom extractor
60.4.2. Resolving Expressions for a Value
60.4.3. Using the toString() method
61. Customizations
61.1. Customizers
61.2. HTTP
61.3. TracingFilter
61.4. RPC
61.5. Custom service name
61.6. Customization of Reported Spans
61.7. Host Locator
62. Sending Spans to Zipkin
63. Zipkin Stream Span Consumer
64. Integrations
64.1. OpenTracing
64.2. Runnable and Callable
64.3. Hystrix
64.3.1. Custom Concurrency Strategy
64.3.2. Manual Command setting
64.4. RxJava
64.5. HTTP integration
64.5.1. HTTP Filter
64.5.2. HandlerInterceptor
64.5.3. Async Servlet support
64.5.4. WebFlux support
64.5.5. Dubbo RPC support
64.6. HTTP Client Integration
64.6.1. Synchronous Rest Template
64.6.2. Asynchronous Rest Template
Multiple Asynchronous Rest Templates
64.6.3. WebClient
64.6.4. Traverson
64.6.5. Apache HttpClientBuilder and HttpAsyncClientBuilder
64.6.6. Netty HttpClient
64.6.7. UserInfoRestTemplateCustomizer
64.7. Feign
64.8. gRPC
64.8.1. Variant 1
Dependencies
Server Instrumentation
Client Instrumentation
64.8.2. Variant 2
64.9. Asynchronous Communication
64.9.1. @Async Annotated methods
64.9.2. @Scheduled Annotated Methods
64.9.3. Executor, ExecutorService, and ScheduledExecutorService
Customization of Executors
64.10. Messaging
64.10.1. Spring Integration and Spring Cloud Stream
64.10.2. Spring RabbitMq
64.10.3. Spring Kafka
64.10.4. Spring JMS
64.11. Zuul
64.12. Project Reactor
65. Running examples
IX. Spring Cloud Consul
66. Install Consul
67. Consul Agent
68. Service Discovery with Consul
68.1. How to activate
68.2. Registering with Consul
68.2.1. Registering Management as a Separate Service
68.3. HTTP Health Check
68.3.1. Metadata and Consul tags
68.3.2. Making the Consul Instance ID Unique
68.3.3. Applying Headers to Health Check Requests
68.4. Looking up services
68.4.1. Using Ribbon
68.4.2. Using the DiscoveryClient
68.5. Consul Catalog Watch
69. Distributed Configuration with Consul
69.1. How to activate
69.2. Customizing
69.3. Config Watch
69.4. YAML or Properties with Config
69.5. git2consul with Config
69.6. Fail Fast
70. Consul Retry
71. Spring Cloud Bus with Consul
71.1. How to activate
72. Circuit Breaker with Hystrix
73. Hystrix metrics aggregation with Turbine and Consul
X. Spring Cloud Zookeeper
74. Install Zookeeper
75. Service Discovery with Zookeeper
75.1. Activating
75.2. Registering with Zookeeper
75.3. Using the DiscoveryClient
76. Using Spring Cloud Zookeeper with Spring Cloud Netflix Components
76.1. Ribbon with Zookeeper
77. Spring Cloud Zookeeper and Service Registry
77.1. Instance Status
78. Zookeeper Dependencies
78.1. Using the Zookeeper Dependencies
78.2. Activating Zookeeper Dependencies
78.3. Setting up Zookeeper Dependencies
78.3.1. Aliases
78.3.2. Path
78.3.3. Load Balancer Type
78.3.4. Content-Type Template and Version
78.3.5. Default Headers
78.3.6. Required Dependencies
78.3.7. Stubs
78.4. Configuring Spring Cloud Zookeeper Dependencies
79. Spring Cloud Zookeeper Dependency Watcher
79.1. Activating
79.2. Registering a Listener
79.3. Using the Presence Checker
80. Distributed Configuration with Zookeeper
80.1. Activating
80.2. Customizing
80.3. Access Control Lists (ACLs)
XI. Spring Cloud Security
81. Quickstart
81.1. OAuth2 Single Sign On
81.2. OAuth2 Protected Resource
82. More Detail
82.1. Single Sign On
82.2. Token Relay
82.2.1. Client Token Relay in Spring Cloud Gateway
82.2.2. Client Token Relay
82.2.3. Client Token Relay in Zuul Proxy
82.2.4. Resource Server Token Relay
83. Configuring Authentication Downstream of a Zuul Proxy
XII. Spring Cloud for Cloud Foundry
84. Discovery
85. Single Sign On
XIII. Spring Cloud Contract
86. Spring Cloud Contract
87. Spring Cloud Contract Verifier Introduction
87.1. History
87.2. Why a Contract Verifier?
87.2.1. Testing issues
87.3. Purposes
87.4. How It Works
87.4.1. A Three-second Tour
On the Producer Side
On the Consumer Side
87.4.2. A Three-minute Tour
On the Producer Side
On the Consumer Side
87.4.3. Defining the Contract
87.4.4. Client Side
87.4.5. Server Side
87.5. Step-by-step Guide to Consumer Driven Contracts (CDC)
87.5.1. Technical note
87.5.2. Consumer side (Loan Issuance)
87.5.3. Producer side (Fraud Detection server)
87.5.4. Consumer Side (Loan Issuance) Final Step
87.6. Dependencies
87.7. Additional Links
87.7.1. Spring Cloud Contract video
87.7.2. Readings
87.8. Samples
88. Spring Cloud Contract FAQ
88.1. Why use Spring Cloud Contract Verifier and not X ?
88.2. I don’t want to write a contract in Groovy!
88.3. What is this value(consumer(), producer()) ?
88.4. How to do Stubs versioning?
88.4.1. API Versioning
88.4.2. JAR versioning
88.4.3. Dev or prod stubs
88.5. Common repo with contracts
88.5.1. Repo structure
88.5.2. Workflow
88.5.3. Consumer
88.5.4. Producer
88.5.5. How can I define messaging contracts per topic not per producer?
For Maven Project
For Gradle Project
88.6. Do I need a Binary Storage? Can’t I use Git?
88.6.1. Protocol convention
88.6.2. Producer
88.6.3. Producer with contracts stored locally
Keeping contracts with the producer and stubs in an external repository
88.6.4. Consumer
88.7. Can I use the Pact Broker?
88.7.1. Pact Consumer
88.7.2. Producer
88.7.3. Pact Consumer (Producer Contract approach)
88.8. How can I debug the request/response being sent by the generated tests client?
88.8.1. How can I debug the mapping/request/response being sent by WireMock?
88.8.2. How can I see what got registered in the HTTP server stub?
88.8.3. Can I reference text from file?
89. Spring Cloud Contract Verifier Setup
89.1. Gradle Project
89.1.1. Prerequisites
90. Add Gradle Plugin with Dependencies
90.1. Gradle and Rest Assured 2.0
90.2. Snapshot Versions for Gradle
90.3. Add stubs
90.4. Run the Plugin
90.5. Default Setup
90.6. Configure Plugin
90.7. Configuration Options
90.8. Single Base Class for All Tests
90.9. Different Base Classes for Contracts
90.10. Invoking Generated Tests
90.11. Pushing stubs to SCM
90.12. Spring Cloud Contract Verifier on the Consumer Side
90.13. Maven Project
90.13.1. Add maven plugin
90.13.2. Maven and Rest Assured 2.0
90.13.3. Snapshot versions for Maven
90.13.4. Add stubs
90.13.5. Run plugin
90.13.6. Configure plugin
90.13.7. Configuration Options
90.13.8. Single Base Class for All Tests
90.13.9. Different base classes for contracts
90.13.10. Invoking generated tests
90.13.11. Pushing stubs to SCM
90.13.12. Maven Plugin and STS
90.13.13. Maven Plugin with Spock Tests
90.14. Stubs and Transitive Dependencies
90.15. Scenarios
90.16. Docker Project
90.16.1. Short intro to Maven, JARs and Binary storage
90.16.2. How it works
Environment Variables
90.16.3. Example of usage
90.16.4. Server side (nodejs)
91. Spring Cloud Contract Verifier Messaging
91.1. Integrations
91.2. Manual Integration Testing
91.3. Publisher-Side Test Generation
91.3.1. Scenario 1: No Input Message
91.3.2. Scenario 2: Output Triggered by Input
91.3.3. Scenario 3: No Output Message
91.4. Consumer Stub Generation
92. Spring Cloud Contract Stub Runner
92.1. Snapshot versions
92.2. Publishing Stubs as JARs
92.3. Stub Runner Core
92.3.1. Retrieving stubs
Stub downloading
Classpath scanning
Configuring HTTP Server Stubs
92.3.2. Running stubs
Running using main app
HTTP Stubs
Viewing registered mappings
Messaging Stubs
92.4. Stub Runner JUnit Rule and Stub Runner JUnit5 Extension
92.4.1. Maven settings
92.4.2. Providing fixed ports
92.4.3. Fluent API
92.4.4. Stub Runner with Spring
92.5. Stub Runner Spring Cloud
92.5.1. Stubbing Service Discovery
Test profiles and service discovery
92.5.2. Additional Configuration
92.6. Stub Runner Boot Application
92.6.1. How to use it?
Stub Runner Server
Stub Runner Server Fat Jar
Spring Cloud CLI
92.6.2. Endpoints
HTTP
Messaging
92.6.3. Example
92.6.4. Stub Runner Boot with Service Discovery
92.7. Stubs Per Consumer
92.8. Common
92.8.1. Common Properties for JUnit and Spring
92.8.2. Stub Runner Stubs IDs
92.9. Stub Runner Docker
92.9.1. How to use it
92.9.2. Example of client side usage in a non JVM project
93. Stub Runner for Messaging
93.1. Stub triggering
93.1.1. Trigger by Label
93.1.2. Trigger by Group and Artifact Ids
93.1.3. Trigger by Artifact Ids
93.1.4. Trigger All Messages
93.2. Stub Runner Camel
93.2.1. Adding it to the project
93.2.2. Disabling the functionality
93.2.3. Examples
Stubs structure
Scenario 1 (no input message)
Scenario 2 (output triggered by input)
Scenario 3 (input with no output)
93.3. Stub Runner Integration
93.3.1. Adding the Runner to the Project
93.3.2. Disabling the functionality
Scenario 1 (no input message)
Scenario 2 (output triggered by input)
Scenario 3 (input with no output)
93.4. Stub Runner Stream
93.4.1. Adding the Runner to the Project
93.4.2. Disabling the functionality
Scenario 1 (no input message)
Scenario 2 (output triggered by input)
Scenario 3 (input with no output)
93.5. Stub Runner Spring AMQP
93.5.1. Adding the Runner to the Project
Triggering the message
Spring AMQP Test Configuration
94. Contract DSL
94.1. Limitations
94.2. Common Top-Level elements
94.2.1. Description
94.2.2. Name
94.2.3. Ignoring Contracts
94.2.4. Passing Values from Files
94.2.5. HTTP Top-Level Elements
94.3. Request
94.4. Response
94.5. Dynamic properties
94.5.1. Dynamic properties inside the body
94.5.2. Regular expressions
94.5.3. Passing Optional Parameters
94.5.4. Executing Custom Methods on the Server Side
94.5.5. Referencing the Request from the Response
94.5.6. Registering Your Own WireMock Extension
94.5.7. Dynamic Properties in the Matchers Sections
94.6. JAX-RS Support
94.7. Async Support
94.8. Working with Context Paths
94.9. Working with WebFlux
94.9.1. WebFlux with WebTestClient
94.9.2. WebFlux with Explicit mode
94.10. XML Support for REST
94.11. Messaging Top-Level Elements
94.11.1. Output Triggered by a Method
94.11.2. Output Triggered by a Message
94.11.3. Consumer/Producer
94.11.4. Common
94.12. Multiple Contracts in One File
94.13. Generating Spring REST Docs snippets from the contracts
95. Customization
95.1. Extending the DSL
95.1.1. Common JAR
95.1.2. Adding the Dependency to the Project
95.1.3. Test the Dependency in the Project’s Dependencies
95.1.4. Test a Dependency in the Plugin’s Dependencies
95.1.5. Referencing classes in DSLs
96. Using the Pluggable Architecture
96.1. Custom Contract Converter
96.1.1. Pact Converter
96.1.2. Pact Contract
96.1.3. Pact for Producers
96.1.4. Pact for Consumers
96.2. Using the Custom Test Generator
96.3. Using the Custom Stub Generator
96.4. Using the Custom Stub Runner
96.5. Using the Custom Stub Downloader
96.6. Using the SCM Stub Downloader
96.7. Using the Pact Stub Downloader
97. Spring Cloud Contract WireMock
97.1. Registering Stubs Automatically
97.2. Using Files to Specify the Stub Bodies
97.3. Alternative: Using JUnit Rules
97.4. Relaxed SSL Validation for Rest Template
97.5. WireMock and Spring MVC Mocks
97.6. Customization of WireMock configuration
97.7. Generating Stubs using REST Docs
97.8. Generating Contracts by Using REST Docs
98. Migrations
98.1. 1.0.x → 1.1.x
98.1.1. New structure of generated stubs
98.2. 1.1.x → 1.2.x
98.2.1. Custom HttpServerStub
98.2.2. New packages for generated tests
98.2.3. New Methods in TemplateProcessor
98.2.4. RestAssured 3.0
98.3. 1.2.x → 2.0.x
99. Links
XIV. Spring Cloud Vault
100. Quick Start
101. Client Side Usage
101.1. Authentication
102. Authentication methods
102.1. Token authentication
102.2. AppId authentication
102.2.1. Custom UserId
102.3. AppRole authentication
102.4. AWS-EC2 authentication
102.5. AWS-IAM authentication
102.6. Azure MSI authentication
102.7. TLS certificate authentication
102.8. Cubbyhole authentication
102.9. GCP-GCE authentication
102.10. GCP-IAM authentication
102.11. Kubernetes authentication
103. Secret Backends
103.1. Generic Backend
103.2. Versioned Key-Value Backend
103.3. Consul
103.4. RabbitMQ
103.5. AWS
104. Database backends
104.1. Database
104.2. Apache Cassandra
104.3. MongoDB
104.4. MySQL
104.5. PostgreSQL
105. Configure PropertySourceLocator behavior
106. Service Registry Configuration
107. Vault Client Fail Fast
108. Vault Client SSL configuration
109. Lease lifecycle management (renewal and revocation)
XV. Spring Cloud Gateway
110. How to Include Spring Cloud Gateway
111. Glossary
112. How It Works
113. Configuring Route Predicate Factories and Gateway Filter Factories
113.1. Shortcut Configuration
113.2. Fully Expanded Arguments
114. Route Predicate Factories
114.1. After Route Predicate Factory
114.2. Before Route Predicate Factory
114.3. Between Route Predicate Factory
114.4. Cookie Route Predicate Factory
114.5. Header Route Predicate Factory
114.6. Host Route Predicate Factory
114.7. Method Route Predicate Factory
114.8. Path Route Predicate Factory
114.9. Query Route Predicate Factory
114.10. RemoteAddr Route Predicate Factory
114.11. Weight Route Predicate Factory
114.11.1. Modifying the way remote addresses are resolved
115. GatewayFilter Factories
115.1. AddRequestHeader GatewayFilter Factory
115.2. AddRequestParameter GatewayFilter Factory
115.3. AddResponseHeader GatewayFilter Factory
115.4. DedupeResponseHeader GatewayFilter Factory
115.5. Hystrix GatewayFilter Factory
115.6. FallbackHeaders GatewayFilter Factory
115.7. MapRequestHeader GatewayFilter Factory
115.8. PrefixPath GatewayFilter Factory
115.9. PreserveHostHeader GatewayFilter Factory
115.10. RequestRateLimiter GatewayFilter Factory
115.10.1. Redis RateLimiter
115.11. RedirectTo GatewayFilter Factory
115.12. RemoveRequestHeader GatewayFilter Factory
115.13. RemoveResponseHeader GatewayFilter Factory
115.14. RewritePath GatewayFilter Factory
115.15. RewriteLocationResponseHeader GatewayFilter Factory
115.16. RewriteResponseHeader GatewayFilter Factory
115.17. SaveSession GatewayFilter Factory
115.18. SecureHeaders GatewayFilter Factory
115.19. SetPath GatewayFilter Factory
115.20. SetRequestHeader GatewayFilter Factory
115.21. SetResponseHeader GatewayFilter Factory
115.22. SetStatus GatewayFilter Factory
115.23. StripPrefix GatewayFilter Factory
115.24. Retry GatewayFilter Factory
115.25. RequestSize GatewayFilter Factory
115.26. Modify Request Body GatewayFilter Factory
115.27. Modify Response Body GatewayFilter Factory
115.28. Default Filters
116. Global Filters
116.1. Combined Global Filter and GatewayFilter Ordering
116.2. Forward Routing Filter
116.3. LoadBalancerClient Filter
116.4. ReactiveLoadBalancerClientFilter
116.5. Netty Routing Filter
116.6. Netty Write Response Filter
116.7. RouteToRequestUrl Filter
116.8. Websocket Routing Filter
116.9. Gateway Metrics Filter
116.10. Marking An Exchange As Routed
117. HttpHeadersFilters
117.1. Forwarded Headers Filter
117.2. RemoveHopByHop Headers Filter
117.3. XForwarded Headers Filter
118. TLS / SSL
118.1. TLS Handshake
119. Configuration
119.1. Fluent Java Routes API
119.2. DiscoveryClient Route Definition Locator
119.2.1. Configuring Predicates and Filters For DiscoveryClient Routes
120. Reactor Netty Access Logs
121. CORS Configuration
122. Actuator API
122.1. Verbose Actuator Format
122.2. Retrieving route filters
122.2.1. Global Filters
122.2.2. Route Filters
122.3. Refreshing the route cache
122.4. Retrieving the routes defined in the gateway
122.5. Retrieving information about a particular route
122.6. Creating and deleting a particular route
122.7. Recap: list of all endpoints
123. Troubleshooting
123.1. Log Levels
123.2. Wiretap
124. Developer Guide
124.1. Writing Custom Route Predicate Factories
124.2. Writing Custom GatewayFilter Factories
124.3. Writing Custom Global Filters
125. Building a Simple Gateway Using Spring MVC or Webflux
XVI. Spring Cloud Function
126. Introduction
127. Getting Started
128. Building and Running a Function
129. Function Catalog and Flexible Function Signatures
129.1. Java 8 function support
129.2. Kotlin Lambda support
130. Standalone Web Applications
131. Standalone Streaming Applications
132. Deploying a Packaged Function
133. Functional Bean Definitions
133.1. Comparing Functional with Traditional Bean Definitions
133.2. Testing Functional Applications
133.3. Limitations of Functional Bean Declaration
134. Dynamic Compilation
135. Serverless Platform Adapters
135.1. AWS Lambda
135.1.1. Introduction
135.1.2. Notes on JAR Layout
135.1.3. Upload
135.1.4. Platfom Specific Features
HTTP and API Gateway
135.2. Azure Functions
135.2.1. Notes on JAR Layout
135.2.2. Build
135.2.3. Running the sample
135.3. Apache Openwhisk
135.3.1. Quick Start
XVII. Spring Cloud Kubernetes
136. Why do you need Spring Cloud Kubernetes?
137. Starters
138. DiscoveryClient for Kubernetes
139. Kubernetes native service discovery
140. Kubernetes PropertySource implementations
140.1. Using a ConfigMap PropertySource
140.2. Secrets PropertySource
140.3. PropertySource Reload
141. Ribbon Discovery in Kubernetes
142. Kubernetes Ecosystem Awareness
142.1. Kubernetes Profile Autoconfiguration
142.2. Istio Awareness
143. Pod Health Indicator
144. Leader Election
145. Security Configurations Inside Kubernetes
145.1. Namespace
145.2. Service Account
146. Service Registry Implementation
147. Examples
148. Other Resources
149. Building
149.1. Basic Compile and Test
149.2. Documentation
149.3. Working with the code
149.3.1. Importing into eclipse with m2eclipse
149.3.2. Importing into eclipse without m2eclipse
150. Contributing
150.1. Sign the Contributor License Agreement
150.2. Code of Conduct
150.3. Code Conventions and Housekeeping
150.4. Checkstyle
150.4.1. Checkstyle configuration
150.5. IDE setup
150.5.1. Intellij IDEA
XVIII. Spring Cloud GCP
151. Introduction
152. Dependency Management
153. Getting started
153.1. Spring Initializr
153.1.1. GCP Support
153.1.2. GCP Messaging
153.1.3. GCP Storage
153.2. Code Samples
153.3. Code Challenges
153.4. Getting Started Guides
154. Spring Cloud GCP Core
154.1. Project ID
154.2. Credentials
154.2.1. Scopes
154.3. Environment
154.4. Spring Initializr
155. Google Cloud Pub/Sub
155.1. Pub/Sub Operations & Template
155.1.1. Publishing to a topic
JSON support
155.1.2. Subscribing to a subscription
155.1.3. Pulling messages from a subscription
155.2. Pub/Sub management
155.2.1. Creating a topic
155.2.2. Deleting a topic
155.2.3. Listing topics
155.2.4. Creating a subscription
155.2.5. Deleting a subscription
155.2.6. Listing subscriptions
155.3. Configuration
155.4. Sample
156. Spring Resources
156.1. Google Cloud Storage
156.1.1. Setting the Content Type
156.2. Configuration
156.3. Sample
157. Spring JDBC
157.1. Prerequisites
157.2. Spring Boot Starter for Google Cloud SQL
157.2.1. DataSource creation flow
157.2.2. Troubleshooting tips
Connection issues
Errors like c.g.cloud.sql.core.SslSocketFactory : Re-throwing cached exception due to attempt to refresh instance information too soon after error
PostgreSQL: java.net.SocketException: already connected issue
157.3. Samples
158. Spring Integration
158.1. Channel Adapters for Cloud Pub/Sub
158.1.1. Inbound channel adapter
158.1.2. Outbound channel adapter
158.1.3. Header mapping
158.2. Sample
158.3. Channel Adapters for Google Cloud Storage
158.3.1. Inbound channel adapter
158.3.2. Inbound streaming channel adapter
158.3.3. Outbound channel adapter
158.4. Sample
159. Spring Cloud Stream
159.1. Overview
159.2. Configuration
159.2.1. Producer Destination Configuration
159.2.2. Consumer Destination Configuration
159.3. Sample
160. Spring Cloud Sleuth
160.1. Tracing
160.2. Spring Boot Starter for Stackdriver Trace
160.3. Overriding the auto-configuration
160.4. Integration with Logging
160.5. Sample
161. Stackdriver Logging
161.1. Web MVC Interceptor
161.2. Logback Support
161.2.1. Log via API
161.2.2. Log via Console
161.3. Sample
162. Spring Cloud Config
162.1. Configuration
162.2. Quick start
162.3. Refreshing the configuration at runtime
162.4. Sample
163. Spring Data Cloud Spanner
163.1. Configuration
163.1.1. Cloud Spanner settings
163.1.2. Repository settings
163.1.3. Autoconfiguration
163.2. Object Mapping
163.2.1. Constructors
163.2.2. Table
SpEL expressions for table names
163.2.3. Primary Keys
163.2.4. Columns
163.2.5. Embedded Objects
163.2.6. Relationships
163.2.7. Supported Types
163.2.8. Lists
163.2.9. Lists of Structs
163.2.10. Custom types
163.2.11. Custom Converter for Struct Array Columns
163.3. Spanner Operations & Template
163.3.1. SQL Query
163.3.2. Read
163.3.3. Advanced reads
Stale read
Read from a secondary index
Read with offsets and limits
Sorting
Partial read
Summary of options for Query vs Read
163.3.4. Write / Update
Insert
Update
Upsert
Partial Update
163.3.5. DML
163.3.6. Transactions
Read/Write Transaction
Read-only Transaction
Declarative Transactions with @Transactional Annotation
163.3.7. DML Statements
163.4. Repositories
163.4.1. CRUD Repository
163.4.2. Paging and Sorting Repository
163.4.3. Spanner Repository
163.5. Query Methods
163.5.1. Query methods by convention
163.5.2. Custom SQL/DML query methods
Query methods with named queries properties
Query methods with annotation
163.5.3. Projections
163.5.4. REST Repositories
163.6. Database and Schema Admin
163.7. Sample
164. Spring Data Cloud Datastore
164.1. Configuration
164.1.1. Cloud Datastore settings
164.1.2. Repository settings
164.1.3. Autoconfiguration
164.2. Object Mapping
164.2.1. Constructors
164.2.2. Kind
164.2.3. Keys
164.2.4. Fields
164.2.5. Supported Types
164.2.6. Custom types
164.2.7. Collections and arrays
164.2.8. Custom Converter for collections
164.3. Relationships
164.3.1. Embedded Entities
Maps
164.3.2. Ancestor-Descendant Relationships
164.3.3. Key Reference Relationships
164.4. Datastore Operations & Template
164.4.1. GQL Query
164.4.2. Find by ID(s)
Indexes
Read with offsets, limits, and sorting
Partial read
164.4.3. Write / Update
Partial Update
164.4.4. Transactions
Declarative Transactions with @Transactional Annotation
164.4.5. Read-Write Support for Maps
164.5. Repositories
164.5.1. Query methods by convention
164.5.2. Custom GQL query methods
Query methods with annotation
Query methods with named queries properties
164.5.3. Transactions
164.5.4. Projections
164.5.5. REST Repositories
164.6. Sample
165. Cloud Memorystore for Redis
165.1. Spring Caching
166. Cloud Identity-Aware Proxy (IAP) Authentication
166.1. Configuration
166.2. Sample
167. Google Cloud Vision
167.1. Cloud Vision Template
167.2. Detect Image Labels Example
167.3. Sample
168. Cloud Foundry
169. Kotlin Support
169.1. Prerequisites
170. Sample
XIX. Appendix: Compendium of Configuration Properties