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.6.1. Spring WebFlux WebClient with Reactive Load Balancer
- 3.6.2. Spring WebFlux WebClient with non-reactive Load Balancer Client
- 3.6.3. Passing your own Load-Balancer Client configuration
- 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 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
- 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. Custom service name
- 61.5. Customization of Reported Spans
- 61.6. 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
- 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
- 101.9. GCP-GCE authentication
- 101.10. GCP-IAM authentication
- 101.11. Kubernetes authentication
- 102. Secret Backends
- 102.1. Generic Backend
- 102.2. Versioned Key-Value Backend
- 102.3. Consul
- 102.4. RabbitMQ
- 102.5. AWS
- 103. Database backends
- 103.1. Database
- 103.2. Apache Cassandra
- 103.3. MongoDB
- 103.4. MySQL
- 103.5. PostgreSQL
- 104. Configure
PropertySourceLocator
behavior - 105. Service Registry Configuration
- 106. Vault Client Fail Fast
- 107. Vault Client SSL configuration
- 108. Lease lifecycle management (renewal and revocation)
- XV. Spring Cloud Gateway
- 109. How to Include Spring Cloud Gateway
- 110. Glossary
- 111. How It Works
- 112. Route Predicate Factories
- 112.1. After Route Predicate Factory
- 112.2. Before Route Predicate Factory
- 112.3. Between Route Predicate Factory
- 112.4. Cookie Route Predicate Factory
- 112.5. Header Route Predicate Factory
- 112.6. Host Route Predicate Factory
- 112.7. Method Route Predicate Factory
- 112.8. Path Route Predicate Factory
- 112.9. Query Route Predicate Factory
- 112.10. RemoteAddr Route Predicate Factory
- 112.10.1. Modifying the way remote addresses are resolved
- 113. GatewayFilter Factories
- 113.1. AddRequestHeader GatewayFilter Factory
- 113.2. AddRequestParameter GatewayFilter Factory
- 113.3. AddResponseHeader GatewayFilter Factory
- 113.4. DedupeResponseHeader GatewayFilter Factory
- 113.5. Hystrix GatewayFilter Factory
- 113.6. FallbackHeaders GatewayFilter Factory
- 113.7. MapRequestHeader GatewayFilter Factory
- 113.8. PrefixPath GatewayFilter Factory
- 113.9. PreserveHostHeader GatewayFilter Factory
- 113.10. RequestRateLimiter GatewayFilter Factory
- 113.10.1. Redis RateLimiter
- 113.11. RedirectTo GatewayFilter Factory
- 113.12. RemoveHopByHopHeadersFilter GatewayFilter Factory
- 113.13. RemoveRequestHeader GatewayFilter Factory
- 113.14. RemoveResponseHeader GatewayFilter Factory
- 113.15. RewritePath GatewayFilter Factory
- 113.16. RewriteLocationResponseHeader GatewayFilter Factory
- 113.17. RewriteResponseHeader GatewayFilter Factory
- 113.18. SaveSession GatewayFilter Factory
- 113.19. SecureHeaders GatewayFilter Factory
- 113.20. SetPath GatewayFilter Factory
- 113.21. SetRequestHeader GatewayFilter Factory
- 113.22. SetResponseHeader GatewayFilter Factory
- 113.23. SetStatus GatewayFilter Factory
- 113.24. StripPrefix GatewayFilter Factory
- 113.25. Retry GatewayFilter Factory
- 113.26. RequestSize GatewayFilter Factory
- 113.27. Modify Request Body GatewayFilter Factory
- 113.28. Modify Response Body GatewayFilter Factory
- 113.29. Default Filters
- 114. Global Filters
- 114.1. Combined Global Filter and GatewayFilter Ordering
- 114.2. Forward Routing Filter
- 114.3. LoadBalancerClient Filter
- 114.4. Netty Routing Filter
- 114.5. Netty Write Response Filter
- 114.6. RouteToRequestUrl Filter
- 114.7. Websocket Routing Filter
- 114.8. Gateway Metrics Filter
- 114.9. Marking An Exchange As Routed
- 115. TLS / SSL
- 115.1. TLS Handshake
- 116. Configuration
- 116.1. Fluent Java Routes API
- 116.2. DiscoveryClient Route Definition Locator
- 116.2.1. Configuring Predicates and Filters For DiscoveryClient Routes
- 117. Reactor Netty Access Logs
- 118. CORS Configuration
- 119. Actuator API
- 119.1. Verbose Actuator Format
- 119.2. Retrieving route filters
- 119.2.1. Global Filters
- 119.2.2. Route Filters
- 119.3. Refreshing the route cache
- 119.4. Retrieving the routes defined in the gateway
- 119.5. Retrieving information about a particular route
- 119.6. Creating and deleting a particular route
- 119.7. Recap: list of all endpoints
- 120. Troubleshooting
- 120.1. Log Levels
- 120.2. Wiretap
- 121. Developer Guide
- 121.1. Writing Custom Route Predicate Factories
- 121.2. Writing Custom GatewayFilter Factories
- 121.3. Writing Custom Global Filters
- 121.4. Writing Custom Route Locators and Writers
- 122. Building a Simple Gateway Using Spring MVC or Webflux
- XVI. Spring Cloud Function
- 123. Introduction
- 124. Getting Started
- 125. Building and Running a Function
- 126. Function Catalog and Flexible Function Signatures
- 126.1. Java 8 function support
- 126.2. Kotlin Lambda support
- 127. Standalone Web Applications
- 128. Standalone Streaming Applications
- 129. Deploying a Packaged Function
- 130. Functional Bean Definitions
- 130.1. Comparing Functional with Traditional Bean Definitions
- 130.2. Testing Functional Applications
- 130.3. Limitations of Functional Bean Declaration
- 131. Dynamic Compilation
- 132. Serverless Platform Adapters
- 132.1. AWS Lambda
- 132.1.1. Introduction
- 132.1.2. Notes on JAR Layout
- 132.1.3. Upload
- 132.1.4. Platfom Specific Features
- HTTP and API Gateway
- 132.2. Azure Functions
- 132.2.1. Notes on JAR Layout
- 132.2.2. Build
- 132.2.3. Running the sample
- 132.3. Apache Openwhisk
- 132.3.1. Quick Start
- XVII. Spring Cloud Kubernetes
- 133. Why do you need Spring Cloud Kubernetes?
- 134. Starters
- 135. DiscoveryClient for Kubernetes
- 136. Kubernetes native service discovery
- 137. Kubernetes PropertySource implementations
- 137.1. Using a
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. Service Registry Implementation
- 144. Examples
- 145. Other Resources
- 146. Building
- 146.1. Basic Compile and Test
- 146.2. Documentation
- 146.3. Working with the code
- 146.3.1. Importing into eclipse with m2eclipse
- 146.3.2. Importing into eclipse without m2eclipse
- 147. Contributing
- 147.1. Sign the Contributor License Agreement
- 147.2. Code of Conduct
- 147.3. Code Conventions and Housekeeping
- 147.4. Checkstyle
- 147.4.1. Checkstyle configuration
- 147.5. IDE setup
- 147.5.1. Intellij IDEA
- XVIII. Spring Cloud GCP
- 148. Introduction
- 149. Dependency Management
- 150. Getting started
- 150.1. Spring Initializr
- 150.1.1. GCP Support
- 150.1.2. GCP Messaging
- 150.1.3. GCP Storage
- 150.2. Code Samples
- 150.3. Code Challenges
- 150.4. Getting Started Guides
- 151. Spring Cloud GCP Core
- 151.1. Project ID
- 151.2. Credentials
- 151.2.1. Scopes
- 151.3. Environment
- 151.4. Spring Initializr
- 152. Google Cloud Pub/Sub
- 152.1. Pub/Sub Operations & Template
- 152.1.1. Publishing to a topic
- JSON support
- 152.1.2. Subscribing to a subscription
- 152.1.3. Pulling messages from a subscription
- 152.2. Pub/Sub management
- 152.2.1. Creating a topic
- 152.2.2. Deleting a topic
- 152.2.3. Listing topics
- 152.2.4. Creating a subscription
- 152.2.5. Deleting a subscription
- 152.2.6. Listing subscriptions
- 152.3. Configuration
- 152.4. Sample
- 153. Spring Resources
- 153.1. Google Cloud Storage
- 153.1.1. Setting the Content Type
- 153.2. Configuration
- 153.3. Sample
- 154. Spring JDBC
- 154.1. Prerequisites
- 154.2. Spring Boot Starter for Google Cloud SQL
- 154.2.1.
DataSource
creation flow - 154.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
- 154.3. Samples
- 155. Spring Integration
- 155.1. Channel Adapters for Cloud Pub/Sub
- 155.1.1. Inbound channel adapter
- 155.1.2. Outbound channel adapter
- 155.1.3. Header mapping
- 155.2. Sample
- 155.3. Channel Adapters for Google Cloud Storage
- 155.3.1. Inbound channel adapter
- 155.3.2. Inbound streaming channel adapter
- 155.3.3. Outbound channel adapter
- 155.4. Sample
- 156. Spring Cloud Stream
- 156.1. Overview
- 156.2. Configuration
- 156.2.1. Producer Destination Configuration
- 156.2.2. Consumer Destination Configuration
- 156.3. Sample
- 157. Spring Cloud Sleuth
- 157.1. Tracing
- 157.2. Spring Boot Starter for Stackdriver Trace
- 157.3. Overriding the auto-configuration
- 157.4. Integration with Logging
- 157.5. Sample
- 158. Stackdriver Logging
- 158.1. Web MVC Interceptor
- 158.2. Logback Support
- 158.2.1. Log via API
- 158.2.2. Log via Console
- 158.3. Sample
- 159. Spring Cloud Config
- 159.1. Configuration
- 159.2. Quick start
- 159.3. Refreshing the configuration at runtime
- 159.4. Sample
- 160. Spring Data Cloud Spanner
- 160.1. Configuration
- 160.1.1. Cloud Spanner settings
- 160.1.2. Repository settings
- 160.1.3. Autoconfiguration
- 160.2. Object Mapping
- 160.2.1. Constructors
- 160.2.2. Table
- SpEL expressions for table names
- 160.2.3. Primary Keys
- 160.2.4. Columns
- 160.2.5. Embedded Objects
- 160.2.6. Relationships
- 160.2.7. Supported Types
- 160.2.8. Lists
- 160.2.9. Lists of Structs
- 160.2.10. Custom types
- 160.2.11. Custom Converter for Struct Array Columns
- 160.3. Spanner Operations & Template
- 160.3.1. SQL Query
- 160.3.2. Read
- 160.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
- 160.3.4. Write / Update
- Insert
- Update
- Upsert
- Partial Update
- 160.3.5. DML
- 160.3.6. Transactions
- Read/Write Transaction
- Read-only Transaction
- Declarative Transactions with @Transactional Annotation
- 160.3.7. DML Statements
- 160.4. Repositories
- 160.4.1. CRUD Repository
- 160.4.2. Paging and Sorting Repository
- 160.4.3. Spanner Repository
- 160.5. Query Methods
- 160.5.1. Query methods by convention
- 160.5.2. Custom SQL/DML query methods
- Query methods with named queries properties
- Query methods with annotation
- 160.5.3. Projections
- 160.5.4. REST Repositories
- 160.6. Database and Schema Admin
- 160.7. Sample
- 161. Spring Data Cloud Datastore
- 161.1. Configuration
- 161.1.1. Cloud Datastore settings
- 161.1.2. Repository settings
- 161.1.3. Autoconfiguration
- 161.2. Object Mapping
- 161.2.1. Constructors
- 161.2.2. Kind
- 161.2.3. Keys
- 161.2.4. Fields
- 161.2.5. Supported Types
- 161.2.6. Custom types
- 161.2.7. Collections and arrays
- 161.2.8. Custom Converter for collections
- 161.3. Relationships
- 161.3.1. Embedded Entities
- Maps
- 161.3.2. Ancestor-Descendant Relationships
- 161.3.3. Key Reference Relationships
- 161.4. Datastore Operations & Template
- 161.4.1. GQL Query
- 161.4.2. Find by ID(s)
- Indexes
- Read with offsets, limits, and sorting
- Partial read
- 161.4.3. Write / Update
- Partial Update
- 161.4.4. Transactions
- Declarative Transactions with @Transactional Annotation
- 161.4.5. Read-Write Support for Maps
- 161.5. Repositories
- 161.5.1. Query methods by convention
- 161.5.2. Custom GQL query methods
- Query methods with annotation
- Query methods with named queries properties
- 161.5.3. Transactions
- 161.5.4. Projections
- 161.5.5. REST Repositories
- 161.6. Sample
- 162. Cloud Memorystore for Redis
- 162.1. Spring Caching
- 163. Cloud Identity-Aware Proxy (IAP) Authentication
- 163.1. Configuration
- 163.2. Sample
- 164. Google Cloud Vision
- 164.1. Cloud Vision Template
- 164.2. Detect Image Labels Example
- 164.3. Sample
- 165. Cloud Foundry
- 166. Kotlin Support
- 166.1. Prerequisites
- 167. Sample
- XIX. Appendix: Compendium of Configuration Properties