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. Spring WebFlux WebClient as a Load Balancer Client
3.7. Ignore Network Interfaces
3.8. HTTP Client Factories
3.9. Enabled Features
3.9.1. Feature types
3.9.2. Declaring features
3.10. 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
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 Read 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
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
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. HTTP
61.2. TracingFilter
61.3. Custom service name
61.4. Customization of Reported Spans
61.5. 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. Dependencies
64.8.2. Server Instrumentation
64.8.3. Client Instrumentation
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
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
89.1.2. Add Gradle Plugin with Dependencies
89.1.3. Gradle and Rest Assured 2.0
89.1.4. Snapshot Versions for Gradle
89.1.5. Add stubs
89.1.6. Run the Plugin
89.1.7. Default Setup
89.1.8. Configure Plugin
89.1.9. Configuration Options
89.1.10. Single Base Class for All Tests
89.1.11. Different Base Classes for Contracts
89.1.12. Invoking Generated Tests
89.1.13. Pushing stubs to SCM
89.1.14. Spring Cloud Contract Verifier on the Consumer Side
89.2. Maven Project
89.2.1. Add maven plugin
89.2.2. Maven and Rest Assured 2.0
89.2.3. Snapshot versions for Maven
89.2.4. Add stubs
89.2.5. Run plugin
89.2.6. Configure plugin
89.2.7. Configuration Options
89.2.8. Single Base Class for All Tests
89.2.9. Different base classes for contracts
89.2.10. Invoking generated tests
89.2.11. Pushing stubs to SCM
89.2.12. Maven Plugin and STS
89.2.13. Maven Plugin with Spock Tests
89.3. Stubs and Transitive Dependencies
89.4. Scenarios
89.5. Docker Project
89.5.1. Short intro to Maven, JARs and Binary storage
89.5.2. How it works
Environment Variables
89.5.3. Example of usage
89.5.4. Server side (nodejs)
90. Spring Cloud Contract Verifier Messaging
90.1. Integrations
90.2. Manual Integration Testing
90.3. Publisher-Side Test Generation
90.3.1. Scenario 1: No Input Message
90.3.2. Scenario 2: Output Triggered by Input
90.3.3. Scenario 3: No Output Message
90.4. Consumer Stub Generation
91. Spring Cloud Contract Stub Runner
91.1. Snapshot versions
91.2. Publishing Stubs as JARs
91.3. Stub Runner Core
91.3.1. Retrieving stubs
Stub downloading
Classpath scanning
Configuring HTTP Server Stubs
91.3.2. Running stubs
Running using main app
HTTP Stubs
Viewing registered mappings
Messaging Stubs
91.4. Stub Runner JUnit Rule and Stub Runner JUnit5 Extension
91.4.1. Maven settings
91.4.2. Providing fixed ports
91.4.3. Fluent API
91.4.4. Stub Runner with Spring
91.5. Stub Runner Spring Cloud
91.5.1. Stubbing Service Discovery
Test profiles and service discovery
91.5.2. Additional Configuration
91.6. Stub Runner Boot Application
91.6.1. How to use it?
Stub Runner Server
Stub Runner Server Fat Jar
Spring Cloud CLI
91.6.2. Endpoints
HTTP
Messaging
91.6.3. Example
91.6.4. Stub Runner Boot with Service Discovery
91.7. Stubs Per Consumer
91.8. Common
91.8.1. Common Properties for JUnit and Spring
91.8.2. Stub Runner Stubs IDs
91.9. Stub Runner Docker
91.9.1. How to use it
91.9.2. Example of client side usage in a non JVM project
92. Stub Runner for Messaging
92.1. Stub triggering
92.1.1. Trigger by Label
92.1.2. Trigger by Group and Artifact Ids
92.1.3. Trigger by Artifact Ids
92.1.4. Trigger All Messages
92.2. Stub Runner Camel
92.2.1. Adding it to the project
92.2.2. Disabling the functionality
92.2.3. Examples
Stubs structure
Scenario 1 (no input message)
Scenario 2 (output triggered by input)
Scenario 3 (input with no output)
92.3. Stub Runner Integration
92.3.1. Adding the Runner to the Project
92.3.2. Disabling the functionality
Scenario 1 (no input message)
Scenario 2 (output triggered by input)
Scenario 3 (input with no output)
92.4. Stub Runner Stream
92.4.1. Adding the Runner to the Project
92.4.2. Disabling the functionality
Scenario 1 (no input message)
Scenario 2 (output triggered by input)
Scenario 3 (input with no output)
92.5. Stub Runner Spring AMQP
92.5.1. Adding the Runner to the Project
Triggering the message
Spring AMQP Test Configuration
93. Contract DSL
93.1. Limitations
93.2. Common Top-Level elements
93.2.1. Description
93.2.2. Name
93.2.3. Ignoring Contracts
93.2.4. Passing Values from Files
93.2.5. HTTP Top-Level Elements
93.3. Request
93.4. Response
93.5. Dynamic properties
93.5.1. Dynamic properties inside the body
93.5.2. Regular expressions
93.5.3. Passing Optional Parameters
93.5.4. Executing Custom Methods on the Server Side
93.5.5. Referencing the Request from the Response
93.5.6. Registering Your Own WireMock Extension
93.5.7. Dynamic Properties in the Matchers Sections
93.6. JAX-RS Support
93.7. Async Support
93.8. Working with Context Paths
93.9. Working with WebFlux
93.9.1. WebFlux with WebTestClient
93.9.2. WebFlux with Explicit mode
93.10. XML Support for REST
93.11. Messaging Top-Level Elements
93.11.1. Output Triggered by a Method
93.11.2. Output Triggered by a Message
93.11.3. Consumer/Producer
93.11.4. Common
93.12. Multiple Contracts in One File
93.13. Generating Spring REST Docs snippets from the contracts
94. Customization
94.1. Extending the DSL
94.1.1. Common JAR
94.1.2. Adding the Dependency to the Project
94.1.3. Test the Dependency in the Project’s Dependencies
94.1.4. Test a Dependency in the Plugin’s Dependencies
94.1.5. Referencing classes in DSLs
95. Using the Pluggable Architecture
95.1. Custom Contract Converter
95.1.1. Pact Converter
95.1.2. Pact Contract
95.1.3. Pact for Producers
95.1.4. Pact for Consumers
95.2. Using the Custom Test Generator
95.3. Using the Custom Stub Generator
95.4. Using the Custom Stub Runner
95.5. Using the Custom Stub Downloader
95.6. Using the SCM Stub Downloader
95.7. Using the Pact Stub Downloader
96. Spring Cloud Contract WireMock
96.1. Registering Stubs Automatically
96.2. Using Files to Specify the Stub Bodies
96.3. Alternative: Using JUnit Rules
96.4. Relaxed SSL Validation for Rest Template
96.5. WireMock and Spring MVC Mocks
96.6. Customization of WireMock configuration
96.7. Generating Stubs using REST Docs
96.8. Generating Contracts by Using REST Docs
97. Migrations
97.1. 1.0.x → 1.1.x
97.1.1. New structure of generated stubs
97.2. 1.1.x → 1.2.x
97.2.1. Custom HttpServerStub
97.2.2. New packages for generated tests
97.2.3. New Methods in TemplateProcessor
97.2.4. RestAssured 3.0
97.3. 1.2.x → 2.0.x
98. Links
XIV. Spring Cloud Vault
99. Quick Start
100. Client Side Usage
100.1. Authentication
101. Authentication methods
101.1. Token authentication
101.2. AppId authentication
101.2.1. Custom UserId
101.3. AppRole authentication
101.4. AWS-EC2 authentication
101.5. AWS-IAM authentication
101.6. Azure MSI authentication
101.7. TLS certificate authentication
101.8. Cubbyhole authentication
102. GCP-GCE authentication
103. GCP-IAM authentication
103.1. Kubernetes authentication
104. Secret Backends
104.1. Generic Backend
104.2. Versioned Key-Value Backend
104.3. Consul
104.4. RabbitMQ
104.5. AWS
105. Database backends
105.1. Database
105.2. Apache Cassandra
105.3. MongoDB
105.4. MySQL
105.5. PostgreSQL
106. Configure PropertySourceLocator behavior
107. Service Registry Configuration
108. Vault Client Fail Fast
109. Vault Client SSL configuration
110. Lease lifecycle management (renewal and revocation)
XV. Spring Cloud Gateway
111. How to Include Spring Cloud Gateway
112. Glossary
113. How It Works
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.10.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. Hystrix GatewayFilter Factory
115.5. FallbackHeaders GatewayFilter Factory
115.6. PrefixPath GatewayFilter Factory
115.7. PreserveHostHeader GatewayFilter Factory
115.8. RequestRateLimiter GatewayFilter Factory
115.8.1. Redis RateLimiter
115.9. RedirectTo GatewayFilter Factory
115.10. RemoveNonProxyHeaders GatewayFilter Factory
115.11. RemoveRequestHeader GatewayFilter Factory
115.12. RemoveResponseHeader GatewayFilter Factory
115.13. RewritePath GatewayFilter Factory
115.14. RewriteResponseHeader GatewayFilter Factory
115.15. SaveSession GatewayFilter Factory
115.16. SecureHeaders GatewayFilter Factory
115.17. SetPath GatewayFilter Factory
115.18. SetResponseHeader GatewayFilter Factory
115.19. SetStatus GatewayFilter Factory
115.20. StripPrefix GatewayFilter Factory
115.21. Retry GatewayFilter Factory
115.22. RequestSize GatewayFilter Factory
115.23. Modify Request Body GatewayFilter Factory
115.24. Modify Response Body GatewayFilter Factory
116. Global Filters
116.1. Combined Global Filter and GatewayFilter Ordering
116.2. Forward Routing Filter
116.3. LoadBalancerClient Filter
116.4. Netty Routing Filter
116.5. Netty Write Response Filter
116.6. RouteToRequestUrl Filter
116.7. Websocket Routing Filter
116.8. Gateway Metrics Filter
116.9. Making An Exchange As Routed
117. TLS / SSL
117.1. TLS Handshake
118. Configuration
118.1. Fluent Java Routes API
118.2. DiscoveryClient Route Definition Locator
118.2.1. Configuring Predicates and Filters For DiscoveryClient Routes
119. Reactor Netty Access Logs
120. CORS Configuration
121. Actuator API
121.1. Retrieving route filters
121.1.1. Global Filters
121.1.2. Route Filters
121.2. Refreshing the route cache
121.3. Retrieving the routes defined in the gateway
121.4. Retrieving information about a particular route
121.5. Creating and deleting a particular route
121.6. Recap: list of all endpoints
122. Developer Guide
122.1. Writing Custom Route Predicate Factories
122.2. Writing Custom GatewayFilter Factories
122.3. Writing Custom Global Filters
122.4. Writing Custom Route Locators and Writers
123. Building a Simple Gateway Using Spring MVC or Webflux
XVI. Spring Cloud Function
124. Introduction
125. Getting Started
126. Building and Running a Function
127. Function Catalog and Flexible Function Signatures
127.1. Java 8 function support
127.2. Kotlin Lambda support
128. Standalone Web Applications
129. Standalone Streaming Applications
130. Deploying a Packaged Function
131. Functional Bean Definitions
131.1. Comparing Functional with Traditional Bean Definitions
131.2. Testing Functional Applications
131.3. Limitations of Functional Bean Declaration
132. Dynamic Compilation
133. Serverless Platform Adapters
133.1. AWS Lambda
133.1.1. Introduction
133.1.2. Notes on JAR Layout
133.1.3. Upload
133.1.4. Platfom Specific Features
HTTP and API Gateway
133.2. Azure Functions
133.2.1. Notes on JAR Layout
133.2.2. Build
133.2.3. Running the sample
133.3. Apache Openwhisk
133.3.1. Quick Start
XVII. Spring Cloud Kubernetes
134. Why do you need Spring Cloud Kubernetes?
135. DiscoveryClient for Kubernetes
136. Kubernetes native service discovery
137. Kubernetes PropertySource implementations
137.1. ConfigMap PropertySource
137.2. Secrets PropertySource
137.3. PropertySource Reload
138. Ribbon discovery in Kubernetes
139. Kubernetes Ecosystem Awareness
139.1. Kubernetes Profile Autoconfiguration
139.2. Istio Awareness
140. Pod Health Indicator
141. Leader Election
142. Security Configurations inside Kubernetes
142.1. Namespace
142.2. Service Account
143. Examples
144. Other Resources
145. Building
145.1. Basic Compile and Test
145.2. Documentation
145.3. Working with the code
145.3.1. Importing into eclipse with m2eclipse
145.3.2. Importing into eclipse without m2eclipse
146. Contributing
146.1. Sign the Contributor License Agreement
146.2. Code of Conduct
146.3. Code Conventions and Housekeeping
XVIII. Spring Cloud GCP
147. Introduction
148. Dependency Management
149. Getting started
149.1. Spring Initializr
149.1.1. GCP Support
149.1.2. GCP Messaging
149.1.3. GCP Storage
149.2. Code Samples
149.3. Code Challenges
149.4. Getting Started Guides
150. Spring Cloud GCP Core
150.1. Project ID
150.2. Credentials
150.2.1. Scopes
150.3. Environment
150.4. Spring Initializr
151. Google Cloud Pub/Sub
151.1. Pub/Sub Operations & Template
151.1.1. Publishing to a topic
JSON support
151.1.2. Subscribing to a subscription
151.1.3. Pulling messages from a subscription
151.2. Pub/Sub management
151.2.1. Creating a topic
151.2.2. Deleting a topic
151.2.3. Listing topics
151.2.4. Creating a subscription
151.2.5. Deleting a subscription
151.2.6. Listing subscriptions
151.3. Configuration
151.4. Sample
152. Spring Resources
152.1. Google Cloud Storage
152.1.1. Setting the Content Type
152.2. Configuration
152.3. Sample
153. Spring JDBC
153.1. Prerequisites
153.2. Spring Boot Starter for Google Cloud SQL
153.2.1. DataSource creation flow
153.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
153.3. Samples
154. Spring Integration
154.1. Channel Adapters for Cloud Pub/Sub
154.1.1. Inbound channel adapter
154.1.2. Outbound channel adapter
154.1.3. Header mapping
154.2. Sample
154.3. Channel Adapters for Google Cloud Storage
154.3.1. Inbound channel adapter
154.3.2. Inbound streaming channel adapter
154.3.3. Outbound channel adapter
154.4. Sample
155. Spring Cloud Stream
155.1. Overview
155.2. Configuration
155.2.1. Producer Destination Configuration
155.2.2. Consumer Destination Configuration
155.3. Sample
156. Spring Cloud Sleuth
156.1. Tracing
156.2. Spring Boot Starter for Stackdriver Trace
156.3. Integration with Logging
156.4. Sample
157. Stackdriver Logging
157.1. Web MVC Interceptor
157.2. Logback Support
157.2.1. Log via API
157.2.2. Log via Console
157.3. Sample
158. Spring Cloud Config
158.1. Configuration
158.2. Quick start
158.3. Refreshing the configuration at runtime
158.4. Sample
159. Spring Data Cloud Spanner
159.1. Configuration
159.1.1. Cloud Spanner settings
159.1.2. Repository settings
159.1.3. Autoconfiguration
159.2. Object Mapping
159.2.1. Constructors
159.2.2. Table
SpEL expressions for table names
159.2.3. Primary Keys
159.2.4. Columns
159.2.5. Embedded Objects
159.2.6. Relationships
159.2.7. Supported Types
159.2.8. Lists
159.2.9. Lists of Structs
159.2.10. Custom types
159.2.11. Custom Converter for Struct Array Columns
159.3. Spanner Operations & Template
159.3.1. SQL Query
159.3.2. Read
159.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
159.3.4. Write / Update
Insert
Update
Upsert
Partial Update
159.3.5. DML
159.3.6. Transactions
Read/Write Transaction
Read-only Transaction
Declarative Transactions with @Transactional Annotation
159.3.7. DML Statements
159.4. Repositories
159.4.1. CRUD Repository
159.4.2. Paging and Sorting Repository
159.4.3. Spanner Repository
159.5. Query Methods
159.5.1. Query methods by convention
159.5.2. Custom SQL/DML query methods
Query methods with named queries properties
Query methods with annotation
159.5.3. Projections
159.5.4. REST Repositories
159.6. Database and Schema Admin
159.7. Sample
160. Spring Data Cloud Datastore
160.1. Configuration
160.1.1. Cloud Datastore settings
160.1.2. Repository settings
160.1.3. Autoconfiguration
160.2. Object Mapping
160.2.1. Constructors
160.2.2. Kind
160.2.3. Keys
160.2.4. Fields
160.2.5. Supported Types
160.2.6. Custom types
160.2.7. Collections and arrays
160.2.8. Custom Converter for collections
160.3. Relationships
160.3.1. Embedded Entities
Maps
160.3.2. Ancestor-Descendant Relationships
160.3.3. Key Reference Relationships
160.4. Datastore Operations & Template
160.4.1. GQL Query
160.4.2. Find by ID(s)
Indexes
Read with offsets, limits, and sorting
Partial read
160.4.3. Write / Update
Partial Update
160.4.4. Transactions
Declarative Transactions with @Transactional Annotation
160.4.5. Read-Write Support for Maps
160.5. Repositories
160.5.1. Query methods by convention
160.5.2. Custom GQL query methods
Query methods with annotation
Query methods with named queries properties
160.5.3. Transactions
160.5.4. Projections
160.5.5. REST Repositories
160.6. Sample
161. Cloud Memorystore for Redis
161.1. Spring Caching
162. Cloud Identity-Aware Proxy (IAP) Authentication
162.1. Configuration
162.2. Sample
163. Google Cloud Vision
163.1. Cloud Vision Template
163.2. Detect Image Labels Example
163.3. Sample
164. Cloud Foundry
165. Kotlin Support
165.1. Prerequisites
166. Sample
XIX. Appendix: Compendium of Configuration Properties