提交 31b1e8fc 编写于 作者: M Mao

spring cloud en version

上级 d1f446f8
# Spring Cloud
\ No newline at end of file
Spring Cloud Documentation
==========
This section provides a brief overview of Spring Cloud reference documentation. It serves
as a map for the rest of the document.
[](#documentation-about)[1. About the Documentation](#documentation-about)
----------
The Spring Cloud reference guide is available as
* [Multi-page HTML](https://docs.spring.io/spring-cloud/docs/2021.0.1/reference/html)
* [Single-page HTML](https://docs.spring.io/spring-cloud/docs/2021.0.1/reference/htmlsingle)
* [PDF](https://docs.spring.io/spring-cloud/docs/2021.0.1/reference/pdf/spring-cloud.pdf)
Copies of this document may be made for your own use and for distribution to others,
provided that you do not charge any fee for such copies and further provided that each
copy contains this Copyright Notice, whether distributed in print or electronically.
[](#documentation-getting-help)[2. Getting Help](#documentation-getting-help)
----------
If you have trouble with Spring Cloud, we would like to help.
* Learn the Spring Cloud basics. If you are
starting out with Spring Cloud, try one of the [guides](https://spring.io/guides).
* Ask a question. We monitor [stackoverflow.com](https://stackoverflow.com) for questions
tagged with [`spring-cloud`](https://stackoverflow.com/tags/spring-cloud).
* Chat with us at [Spring Cloud Gitter](https://gitter.im/spring-cloud/spring-cloud)
| |All of Spring Cloud is open source, including the documentation. If you find<br/>problems with the docs or if you want to improve them, please get involved.|
|---|------------------------------------------------------------------------------------------------------------------------------------------------------------|
Legal
==========
2021.0.1
Copyright © 2012-2020
Copies of this document may be made for your own use and for distribution to
others, provided that you do not charge any fee for such copies and further
provided that each copy contains this Copyright Notice, whether distributed in
print or electronically.
此差异已折叠。
Spring Cloud Bus
==========
Spring Cloud Bus links the nodes of a distributed system with a lightweight message
broker. This broker can then be used to broadcast state changes (such as configuration
changes) or other management instructions. A key idea is that the bus is like a
distributed actuator for a Spring Boot application that is scaled out. However, it can
also be used as a communication channel between apps. This project provides starters for
either an AMQP broker or Kafka as the transport.
| |Spring Cloud is released under the non-restrictive Apache 2.0 license. If you would like to contribute to this section of the documentation or if you find an error, please find the source code and issue trackers in the project at [github](https://github.com/spring-cloud/spring-cloud-bus).|
|---|-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|
[](#quick-start)[1. Quick Start](#quick-start)
----------
Spring Cloud Bus works by adding Spring Boot autconfiguration if it detects itself on the
classpath. To enable the bus, add `spring-cloud-starter-bus-amqp` or`spring-cloud-starter-bus-kafka` to your dependency management. Spring Cloud takes care of
the rest. Make sure the broker (RabbitMQ or Kafka) is available and configured. When
running on localhost, you need not do anything. If you run remotely, use Spring Cloud
Connectors or Spring Boot conventions to define the broker credentials, as shown in the
following example for Rabbit:
application.yml
```
spring:
rabbitmq:
host: mybroker.com
port: 5672
username: user
password: secret
```
The bus currently supports sending messages to all nodes listening or all nodes for a
particular service (as defined by Eureka). The `/bus/*` actuator namespace has some HTTP
endpoints. Currently, two are implemented. The first, `/bus/env`, sends key/value pairs to
update each node’s Spring Environment. The second, `/bus/refresh`, reloads each
application’s configuration, as though they had all been pinged on their `/refresh`endpoint.
| |The Spring Cloud Bus starters cover Rabbit and Kafka, because those are the two most<br/>common implementations. However, Spring Cloud Stream is quite flexible, and the binder<br/>works with `spring-cloud-bus`.|
|---|------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|
[](#bus-endpoints)[2. Bus Endpoints](#bus-endpoints)
----------
Spring Cloud Bus provides two endpoints, `/actuator/busrefresh` and `/actuator/busenv`that correspond to individual actuator endpoints in Spring Cloud Commons,`/actuator/refresh` and `/actuator/env` respectively.
### [](#bus-refresh-endpoint)[2.1. Bus Refresh Endpoint](#bus-refresh-endpoint) ###
The `/actuator/busrefresh` endpoint clears the `RefreshScope` cache and rebinds`@ConfigurationProperties`. See the [Refresh Scope](#refresh-scope) documentation for
more information.
To expose the `/actuator/busrefresh` endpoint, you need to add following configuration to your
application:
```
management.endpoints.web.exposure.include=busrefresh
```
### [](#bus-env-endpoint)[2.2. Bus Env Endpoint](#bus-env-endpoint) ###
The `/actuator/busenv` endpoint updates each instances environment with the specified
key/value pair across multiple instances.
To expose the `/actuator/busenv` endpoint, you need to add following configuration to your
application:
```
management.endpoints.web.exposure.include=busenv
```
The `/actuator/busenv` endpoint accepts `POST` requests with the following shape:
```
{
"name": "key1",
"value": "value1"
}
```
[](#addressing-an-instance)[3. Addressing an Instance](#addressing-an-instance)
----------
Each instance of the application has a service ID, whose value can be set with`spring.cloud.bus.id` and whose value is expected to be a colon-separated list of
identifiers, in order from least specific to most specific. The default value is
constructed from the environment as a combination of the `spring.application.name` and`server.port` (or `spring.application.index`, if set). The default value of the ID is
constructed in the form of `app:index:id`, where:
* `app` is the `vcap.application.name`, if it exists, or `spring.application.name`
* `index` is the `vcap.application.instance_index`, if it exists,`spring.application.index`, `local.server.port`, `server.port`, or `0` (in that order).
* `id` is the `vcap.application.instance_id`, if it exists, or a random value.
The HTTP endpoints accept a “destination” path parameter, such as`/busrefresh/customers:9000`, where `destination` is a service ID. If the ID
is owned by an instance on the bus, it processes the message, and all other instances
ignore it.
[](#addressing-all-instances-of-a-service)[4. Addressing All Instances of a Service](#addressing-all-instances-of-a-service)
----------
The “destination” parameter is used in a Spring `PathMatcher` (with the path separator
as a colon — `:`) to determine if an instance processes the message. Using the example
from earlier, `/busenv/customers:**` targets all instances of the
“customers” service regardless of the rest of the service ID.
[](#service-id-must-be-unique)[5. Service ID Must Be Unique](#service-id-must-be-unique)
----------
The bus tries twice to eliminate processing an event — once from the original`ApplicationEvent` and once from the queue. To do so, it checks the sending service ID
against the current service ID. If multiple instances of a service have the same ID,
events are not processed. When running on a local machine, each service is on a different
port, and that port is part of the ID. Cloud Foundry supplies an index to differentiate.
To ensure that the ID is unique outside Cloud Foundry, set `spring.application.index` to
something unique for each instance of a service.
[](#customizing-the-message-broker)[6. Customizing the Message Broker](#customizing-the-message-broker)
----------
Spring Cloud Bus uses [Spring Cloud Stream](https://cloud.spring.io/spring-cloud-stream) to
broadcast the messages. So, to get messages to flow, you need only include the binder
implementation of your choice in the classpath. There are convenient starters for the bus
with AMQP (RabbitMQ) and Kafka (`spring-cloud-starter-bus-[amqp|kafka]`). Generally
speaking, Spring Cloud Stream relies on Spring Boot autoconfiguration conventions for
configuring middleware. For instance, the AMQP broker address can be changed with`spring.rabbitmq.*` configuration properties. Spring Cloud Bus has a handful of
native configuration properties in `spring.cloud.bus.*` (for example,`spring.cloud.bus.destination` is the name of the topic to use as the external
middleware). Normally, the defaults suffice.
To learn more about how to customize the message broker settings, consult the Spring Cloud
Stream documentation.
[](#tracing-bus-events)[7. Tracing Bus Events](#tracing-bus-events)
----------
Bus events (subclasses of `RemoteApplicationEvent`) can be traced by setting`spring.cloud.bus.trace.enabled=true`. If you do so, the Spring Boot `TraceRepository`(if it is present) shows each event sent and all the acks from each service instance. The
following example comes from the `/trace` endpoint:
```
{
"timestamp": "2015-11-26T10:24:44.411+0000",
"info": {
"signal": "spring.cloud.bus.ack",
"type": "RefreshRemoteApplicationEvent",
"id": "c4d374b7-58ea-4928-a312-31984def293b",
"origin": "stores:8081",
"destination": "*:**"
}
},
{
"timestamp": "2015-11-26T10:24:41.864+0000",
"info": {
"signal": "spring.cloud.bus.sent",
"type": "RefreshRemoteApplicationEvent",
"id": "c4d374b7-58ea-4928-a312-31984def293b",
"origin": "customers:9000",
"destination": "*:**"
}
},
{
"timestamp": "2015-11-26T10:24:41.862+0000",
"info": {
"signal": "spring.cloud.bus.ack",
"type": "RefreshRemoteApplicationEvent",
"id": "c4d374b7-58ea-4928-a312-31984def293b",
"origin": "customers:9000",
"destination": "*:**"
}
}
```
The preceding trace shows that a `RefreshRemoteApplicationEvent` was sent from`customers:9000`, broadcast to all services, and received (acked) by `customers:9000` and`stores:8081`.
To handle the ack signals yourself, you could add an `@EventListener` for the`AckRemoteApplicationEvent` and `SentApplicationEvent` types to your app (and enable
tracing). Alternatively, you could tap into the `TraceRepository` and mine the data from
there.
| |Any Bus application can trace acks. However, sometimes, it is<br/>useful to do this in a central service that can do more complex<br/>queries on the data or forward it to a specialized tracing service.|
|---|---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|
[](#broadcasting-your-own-events)[8. Broadcasting Your Own Events](#broadcasting-your-own-events)
----------
The Bus can carry any event of type `RemoteApplicationEvent`. The default transport is
JSON, and the deserializer needs to know which types are going to be used ahead of time.
To register a new type, you must put it in a subpackage of`org.springframework.cloud.bus.event`.
To customise the event name, you can use `@JsonTypeName` on your custom class or rely on
the default strategy, which is to use the simple name of the class.
| |Both the producer and the consumer need access to the class definition.|
|---|-----------------------------------------------------------------------|
### [](#registering-events-in-custom-packages)[8.1. Registering events in custom packages](#registering-events-in-custom-packages) ###
If you cannot or do not want to use a subpackage of `org.springframework.cloud.bus.event`for your custom events, you must specify which packages to scan for events of type`RemoteApplicationEvent` by using the `@RemoteApplicationEventScan` annotation. Packages
specified with `@RemoteApplicationEventScan` include subpackages.
For example, consider the following custom event, called `MyEvent`:
```
package com.acme;
public class MyEvent extends RemoteApplicationEvent {
...
}
```
You can register that event with the deserializer in the following way:
```
package com.acme;
@Configuration
@RemoteApplicationEventScan
public class BusConfiguration {
...
}
```
Without specifying a value, the package of the class where `@RemoteApplicationEventScan`is used is registered. In this example, `com.acme` is registered by using the package of`BusConfiguration`.
You can also explicitly specify the packages to scan by using the `value`, `basePackages`or `basePackageClasses` properties on `@RemoteApplicationEventScan`, as shown in the
following example:
```
package com.acme;
@Configuration
//@RemoteApplicationEventScan({"com.acme", "foo.bar"})
//@RemoteApplicationEventScan(basePackages = {"com.acme", "foo.bar", "fizz.buzz"})
@RemoteApplicationEventScan(basePackageClasses = BusConfiguration.class)
public class BusConfiguration {
...
}
```
All of the preceding examples of `@RemoteApplicationEventScan` are equivalent, in that the`com.acme` package is registered by explicitly specifying the packages on`@RemoteApplicationEventScan`.
| |You can specify multiple base packages to scan.|
|---|-----------------------------------------------|
[](#configuration-properties)[9. Configuration properties](#configuration-properties)
----------
To see the list of all Bus related configuration properties please check [the Appendix page](appendix.html).
此差异已折叠。
Spring Boot Cloud CLI
==========
Spring Boot CLI provides [Spring
Boot](https://projects.spring.io/spring-boot) command line features for [Spring
Cloud](https://github.com/spring-cloud). You can write Groovy scripts to run Spring Cloud component
applications (e.g. `@EnableEurekaServer`). You can also easily do
things like encryption and decryption to support Spring Cloud Config
clients with secret configuration values. With the Launcher CLI you
can launch services like Eureka, Zipkin, Config Server
conveniently all at once from the command line (very useful at
development time).
| |Spring Cloud is released under the non-restrictive Apache 2.0 license. If you would like to contribute to this section of the documentation or if you find an error, please find the source code and issue trackers in the project at [github](https://github.com/spring-cloud/spring-cloud-cli).|
|---|-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|
[Installation](#_installation)
----------
To install, make
sure you have[Spring Boot CLI](https://github.com/spring-projects/spring-boot)(2.0.0 or better):
```
$ spring version
Spring CLI v2.2.3.RELEASE
```
E.g. for SDKMan users
```
$ sdk install springboot 2.2.3.RELEASE
$ sdk use springboot 2.2.3.RELEASE
```
and install the Spring Cloud plugin
```
$ mvn install
$ spring install org.springframework.cloud:spring-cloud-cli:2.2.0.RELEASE
```
| |**Prerequisites:** to use the encryption and decryption features<br/>you need the full-strength JCE installed in your JVM (it’s not there by default).<br/>You can download the "Java Cryptography Extension (JCE) Unlimited Strength Jurisdiction Policy Files"<br/>from Oracle, and follow instructions for installation (essentially replace the 2 policy files<br/>in the JRE lib/security directory with the ones that you downloaded).|
|---|--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|
[Running Spring Cloud Services in Development](#_running_spring_cloud_services_in_development)
----------
The Launcher CLI can be used to run common services like Eureka,
Config Server etc. from the command line. To list the available
services you can do `spring cloud --list`, and to launch a default set
of services just `spring cloud`. To choose the services to deploy,
just list them on the command line, e.g.
```
$ spring cloud eureka configserver h2 kafka stubrunner zipkin
```
Summary of supported deployables:
| Service | Name | Address | Description |
|------------|----------------|---------------------------------------------------------------------------------------------|----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|
| eureka | Eureka Server | [http://localhost:8761](http://localhost:8761) | Eureka server for service registration and discovery. All the other services show up in its catalog by default. |
|configserver| Config Server | [http://localhost:8888](http://localhost:8888) | Spring Cloud Config Server running in the "native" profile and serving configuration from the local directory ./launcher |
| h2 | H2 Database |[http://localhost:9095](http://localhost:9095) (console), jdbc:h2:tcp://localhost:9096/{data}| Relation database service. Use a file path for `{data}` (e.g. `./target/test`) when you connect. Remember that you can add `;MODE=MYSQL` or `;MODE=POSTGRESQL` to connect with compatibility to other server types. |
| kafka | Kafka Broker | [http://localhost:9091](http://localhost:9091) (actuator endpoints), localhost:9092 | |
| dataflow |Dataflow Server | [http://localhost:9393](http://localhost:9393) | Spring Cloud Dataflow server with UI at /admin-ui. Connect the Dataflow shell to target at root path. |
| zipkin | Zipkin Server | [http://localhost:9411](http://localhost:9411) | Zipkin Server with UI for visualizing traces. Stores span data in memory and accepts them via HTTP POST of JSON data. |
| stubrunner |Stub Runner Boot| [http://localhost:8750](http://localhost:8750) |Downloads WireMock stubs, starts WireMock and feeds the started servers with stored stubs. Pass `stubrunner.ids` to pass stub coordinates and then go to `[http://localhost:8750/stubs](http://localhost:8750/stubs)`.|
Each of these apps can be configured using a local YAML file with the same name (in the current
working directory or a subdirectory called "config" or in `~/.spring-cloud`). E.g. in `configserver.yml` you might want to
do something like this to locate a local git repository for the backend:
configserver.yml
```
spring:
profiles:
active: git
cloud:
config:
server:
git:
uri: file://${user.home}/dev/demo/config-repo
```
E.g. in Stub Runner app you could fetch stubs from your local `.m2` in the following way.
stubrunner.yml
```
stubrunner:
workOffline: true
ids:
- com.example:beer-api-producer:+:9876
```
### [Adding Additional Applications](#_adding_additional_applications) ###
Additional applications can be added to `./config/cloud.yml` (not`./config.yml` because that would replace the defaults), e.g. with
config/cloud.yml
```
spring:
cloud:
launcher:
deployables:
source:
coordinates: maven://com.example:source:0.0.1-SNAPSHOT
port: 7000
sink:
coordinates: maven://com.example:sink:0.0.1-SNAPSHOT
port: 7001
```
when you list the apps:
```
$ spring cloud --list
source sink configserver dataflow eureka h2 kafka stubrunner zipkin
```
(notice the additional apps at the start of the list).
[Writing Groovy Scripts and Running Applications](#_writing_groovy_scripts_and_running_applications)
----------
Spring Cloud CLI has support for most of the Spring Cloud declarative
features, such as the `@Enable*` class of annotations. For example,
here is a fully functional Eureka server
app.groovy
```
@EnableEurekaServer
class Eureka {}
```
which you can run from the command line like this
```
$ spring run app.groovy
```
To include additional dependencies, often it suffices just to add the
appropriate feature-enabling annotation, e.g. `@EnableConfigServer`,`@EnableOAuth2Sso` or `@EnableEurekaClient`. To manually include a
dependency you can use a `@Grab` with the special "Spring Boot" short
style artifact co-ordinates, i.e. with just the artifact ID (no need
for group or version information), e.g. to set up a client app to
listen on AMQP for management events from the Spring CLoud Bus:
app.groovy
```
@Grab('spring-cloud-starter-bus-amqp')
@RestController
class Service {
@RequestMapping('/')
def home() { [message: 'Hello'] }
}
```
[Encryption and Decryption](#_encryption_and_decryption)
----------
The Spring Cloud CLI comes with an "encrypt" and a "decrypt"
command. Both accept arguments in the same form with a key specified
as a mandatory "--key", e.g.
```
$ spring encrypt mysecret --key foo
682bc583f4641835fa2db009355293665d2647dade3375c0ee201de2a49f7bda
$ spring decrypt --key foo 682bc583f4641835fa2db009355293665d2647dade3375c0ee201de2a49f7bda
mysecret
```
To use a key in a file (e.g. an RSA public key for encyption) prepend
the key value with "@" and provide the file path, e.g.
```
$ spring encrypt mysecret --key @${HOME}/.ssh/id_rsa.pub
AQAjPgt3eFZQXwt8tsHAVv/QHiY5sI2dRcR+...
```
Spring Cloud for Cloud Foundry
==========
Spring Cloud for Cloudfoundry makes it easy to run[Spring Cloud](https://github.com/spring-cloud) apps in[Cloud Foundry](https://github.com/cloudfoundry) (the Platform as a
Service). Cloud Foundry has the notion of a "service", which is
middlware that you "bind" to an app, essentially providing it with an
environment variable containing credentials (e.g. the location and
username to use for the service).
The `spring-cloud-cloudfoundry-commons` module configures the
Reactor-based Cloud Foundry Java client, v 3.0, and can be used standalone.
The `spring-cloud-cloudfoundry-web` project provides basic support for
some enhanced features of webapps in Cloud Foundry: binding
automatically to single-sign-on services and optionally enabling
sticky routing for discovery.
The `spring-cloud-cloudfoundry-discovery` project provides an
implementation of Spring Cloud Commons `DiscoveryClient` so you can`@EnableDiscoveryClient` and provide your credentials as`spring.cloud.cloudfoundry.discovery.[username,password]` (also `*.url` if you are not connecting to [Pivotal Web Services](https://run.pivotal.io)) and then you
can use the `DiscoveryClient` directly or via a `LoadBalancerClient`.
The first time you use it the discovery client might be slow owing to
the fact that it has to get an access token from Cloud Foundry.
[](#discovery)[1. Discovery](#discovery)
----------
Here’s a Spring Cloud app with Cloud Foundry discovery:
app.groovy
```
@Grab('org.springframework.cloud:spring-cloud-cloudfoundry')
@RestController
@EnableDiscoveryClient
class Application {
@Autowired
DiscoveryClient client
@RequestMapping('/')
String home() {
'Hello from ' + client.getLocalServiceInstance()
}
}
```
If you run it without any service bindings:
```
$ spring jar app.jar app.groovy
$ cf push -p app.jar
```
It will show its app name in the home page.
The `DiscoveryClient` can lists all the apps in a space, according to
the credentials it is authenticated with, where the space defaults to
the one the client is running in (if any). If neither org nor space
are configured, they default per the user’s profile in Cloud Foundry.
[](#single-sign-on)[2. Single Sign On](#single-sign-on)
----------
| |All of the OAuth2 SSO and resource server features moved to Spring Boot<br/>in version 1.3. You can find documentation in the[Spring Boot user guide](https://docs.spring.io/spring-boot/docs/current/reference/htmlsingle/).|
|---|-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|
This project provides automatic binding from CloudFoundry service
credentials to the Spring Boot features. If you have a CloudFoundry
service called "sso", for instance, with credentials containing
"client\_id", "client\_secret" and "auth\_domain", it will bind
automatically to the Spring OAuth2 client that you enable with`@EnableOAuth2Sso` (from Spring Boot). The name of the service can be
parameterized using `spring.oauth2.sso.serviceId`.
[](#configuration)[3. Configuration](#configuration)
----------
To see the list of all Spring Cloud Sloud Foundry related configuration properties please check [the Appendix page](appendix.html).
此差异已折叠。
此差异已折叠。
此差异已折叠。
Spring Cloud Contract Reference Documentation
==========
Adam Dudczak, Mathias Düsterhöft, Marcin Grzejszczak, Dennis Kieselhorst, Jakub Kubryński, Karol Lassak, Olga Maciaszek-Sharma, Mariusz Smykuła, Dave Syer, Jay Bryant
The reference documentation consists of the following sections:
| [Legal](legal.html#legal-information) | Legal information. |
|----------------------------------------------------------------------------|------------------------------------------------------------------------------------------------|
|[Documentation Overview](documentation-overview.html#contract-documentation)| About the Documentation, Getting Help, First Steps, and more. |
| [Getting Started](getting-started.html#getting-started) |Introducing Spring Cloud Contract, Developing Your First Spring Cloud Contract-based Application|
| [Using Spring Cloud Contract](using.html#using) | Spring Cloud Contract usage examples and workflows. |
| [Spring Cloud Contract Features](project-features.html#features) |Contract DSL, Messaging, Spring Cloud Contract Stub Runner, and Spring Cloud Contract WireMock. |
| [Build Tools](project-features.html#features-build-tools) | Maven Plugin, Gradle Plugin, and Docker. |
| [“How-to” Guides](howto.html#howto) | Stubs versioning, Pact integration, Debugging, and more. |
| [Appendices](appendix.html#appendix) | Properties, Metadata, Configuration, Dependencies, and more. |
Spring Cloud Function Reference Documentation
==========
Mark Fisher, Dave Syer, Oleg Zhurakousky, Anshul Mehra
**3.2.2**
The reference documentation consists of the following sections:
| [Reference Guide](spring-cloud-function.html) |Spring Cloud Function Reference|
|------------------------------------------------------------------------------------------------------------------------------------------|-------------------------------|
|[Cloud Events](https://github.com/spring-cloud/spring-cloud-function/tree/master/spring-cloud-function-samples/function-sample-cloudevent)| Cloud Events |
| [RSocket](https://github.com/spring-cloud/spring-cloud-function/tree/master/spring-cloud-function-rsocket) | RSocket |
| [AWS Adapter](aws.html) | AWS Adapter Reference |
| [Azure Adapter](azure.html) | Azure Adapter Reference |
| [GCP Adapter](gcp.html) | GCP Adapter Reference |
Relevant Links:
|[Reactor](https://projectreactor.io/)|Project Reactor|
|-------------------------------------|---------------|
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
Spring Cloud Sleuth Reference Documentation
==========
Adrian Cole, Spencer Gibb, Marcin Grzejszczak, Dave Syer, Jay Bryant
The reference documentation consists of the following sections:
| [Legal](legal.html#legal) | Legal information. |
|--------------------------------------------------------------------------------|--------------------------------------------------------------------------------------------|
|[Documentation Overview](documentation-overview.html#sleuth-documentation-about)| About the Documentation, Getting Help, First Steps, and more. |
| [Getting Started](getting-started.html#getting-started) |Introducing Spring Cloud Sleuth, Developing Your First Spring Cloud Sleuth-based Application|
| [Using Spring Cloud Sleuth](using.html#using) | Spring Cloud Sleuth usage examples and workflows. |
| [Spring Cloud Sleuth Features](project-features.html#features) | Span creation, context propagation, and more. |
| [“How-to” Guides](howto.html#howto) | Add sampling, propagate remote tags, and more. |
| [Spring Cloud Sleuth Integrations](integrations.html#sleuth-integration) | Instrumentation configuration, context propagation, and more. |
| [Appendices](appendix.html#appendix) | Span definitions and configuration properties. |
Spring Cloud Stream Reference Documentation
==========
**3.2.2**
The reference documentation consists of the following sections:
| [Overview](spring-cloud-stream.html#spring-cloud-stream-reference) | History, Quick Start, Concepts, Architecture Overview, Binder Abstraction, and Core Features |
|----------------------------------------------------------------------------------------------------------------------------------------------------------------------------|-----------------------------------------------------------------------------------------------------------------------------------------|
| [Rabbit MQ Binder](https://docs.spring.io/spring-cloud-stream-binder-rabbit/docs/3.2.2/reference/html/spring-cloud-stream-binder-rabbit.html) | Spring Cloud Stream binder reference for Rabbit MQ |
| [Apache Kafka Binder](https://docs.spring.io/spring-cloud-stream-binder-kafka/docs/3.2.2/reference/html/spring-cloud-stream-binder-kafka.html#_apache_kafka_binder) | Spring Cloud Stream binder reference for Apache Kafka |
|[Apache Kafka Streams Binder](https://docs.spring.io/spring-cloud-stream-binder-kafka/docs/3.2.2/reference/html/spring-cloud-stream-binder-kafka.html#_kafka_streams_binder)| Spring Cloud Stream binder reference for Apache Kafka Streams |
| [Additional Binders](binders.html#binders) |A collection of Partner maintained binder implementations for Spring Cloud Stream (e.g., Azure Event Hubs, Google PubSub, Solace PubSub+)|
| [Spring Cloud Stream Samples](https://github.com/spring-cloud/spring-cloud-stream-samples/) | A curated collection of repeatable Spring Cloud Stream samples to walk through the features |
Relevant Links:
| [Spring Cloud Data Flow](https://cloud.spring.io/spring-cloud-dataflow/) | Spring Cloud Data Flow |
|--------------------------------------------------------------------------------|------------------------------------------------------|
|[Enterprise Integration Patterns](http://www.enterpriseintegrationpatterns.com/)|Patterns and Best Practices for Enterprise Integration|
| [Spring Integration](https://spring.io/projects/spring-integration) | Spring Integration framework |
此差异已折叠。
此差异已折叠。
此差异已折叠。
Spring Data Commons - Reference Documentation
==========
Table of Contents
* [Preface](#preface)
* [1. Project Metadata](#project)
* [Reference Documentation](#reference-documentation)
* [2. Dependencies](#dependencies)
* [2.1. Dependency Management with Spring Boot](#dependencies.spring-boot)
* [2.2. Spring Framework](#dependencies.spring-framework)
* [3. Object Mapping Fundamentals](#mapping.fundamentals)
* [3.1. Object creation](#mapping.object-creation)
* [3.2. Property population](#mapping.property-population)
* [3.3. General recommendations](#mapping.general-recommendations)
* [3.3.1. Overriding Properties](#mapping.general-recommendations.override.properties)
* [3.4. Kotlin support](#mapping.kotlin)
* [3.4.1. Kotlin object creation](#)
* [3.4.2. Property population of Kotlin data classes](#)
* [3.4.3. Kotlin Overriding Properties](#mapping.kotlin.override.properties)
* [4. Working with Spring Data Repositories](#repositories)
* [4.1. Core concepts](#repositories.core-concepts)
* [4.2. Query Methods](#repositories.query-methods)
* [4.3. Defining Repository Interfaces](#repositories.definition)
* [4.3.1. Fine-tuning Repository Definition](#repositories.definition-tuning)
* [4.3.2. Using Repositories with Multiple Spring Data Modules](#repositories.multiple-modules)
* [4.4. Defining Query Methods](#repositories.query-methods.details)
* [4.4.1. Query Lookup Strategies](#repositories.query-methods.query-lookup-strategies)
* [4.4.2. Query Creation](#repositories.query-methods.query-creation)
* [4.4.3. Property Expressions](#repositories.query-methods.query-property-expressions)
* [4.4.4. Special parameter handling](#repositories.special-parameters)
* [Paging and Sorting](#repositories.paging-and-sorting)
* [4.4.5. Limiting Query Results](#repositories.limit-query-result)
* [4.4.6. Repository Methods Returning Collections or Iterables](#repositories.collections-and-iterables)
* [Using Streamable as Query Method Return Type](#repositories.collections-and-iterables.streamable)
* [Returning Custom Streamable Wrapper Types](#repositories.collections-and-iterables.streamable-wrapper)
* [Support for Vavr Collections](#repositories.collections-and-iterables.vavr)
* [4.4.7. Null Handling of Repository Methods](#repositories.nullability)
* [Nullability Annotations](#repositories.nullability.annotations)
* [Nullability in Kotlin-based Repositories](#repositories.nullability.kotlin)
* [4.4.8. Streaming Query Results](#repositories.query-streaming)
* [4.4.9. Asynchronous Query Results](#repositories.query-async)
* [4.5. Creating Repository Instances](#repositories.create-instances)
* [4.5.1. XML Configuration](#repositories.create-instances.spring)
* [Using Filters](#repositories.using-filters)
* [4.5.2. Java Configuration](#repositories.create-instances.java-config)
* [4.5.3. Standalone Usage](#repositories.create-instances.standalone)
* [4.6. Custom Implementations for Spring Data Repositories](#repositories.custom-implementations)
* [4.6.1. Customizing Individual Repositories](#repositories.single-repository-behavior)
* [Configuration](#repositories.configuration)
* [4.6.2. Customize the Base Repository](#repositories.customize-base-repository)
* [4.7. Publishing Events from Aggregate Roots](#core.domain-events)
* [4.8. Spring Data Extensions](#core.extensions)
* [4.8.1. Querydsl Extension](#core.extensions.querydsl)
* [4.8.2. Web support](#core.web)
* [Basic Web Support](#core.web.basic)
* [Hypermedia Support for Pageables](#core.web.pageables)
* [Spring Data Jackson Modules](#core.web.basic.jackson-mappers)
* [Web Databinding Support](#core.web.binding)
* [Querydsl Web Support](#core.web.type-safe)
* [4.8.3. Repository Populators](#core.repository-populators)
* [5. Projections](#projections)
* [5.1. Interface-based Projections](#projections.interfaces)
* [5.1.1. Closed Projections](#projections.interfaces.closed)
* [5.1.2. Open Projections](#projections.interfaces.open)
* [5.1.3. Nullable Wrappers](#projections.interfaces.nullable-wrappers)
* [5.2. Class-based Projections (DTOs)](#projections.dtos)
* [5.3. Dynamic Projections](#projection.dynamic)
* [6. Query by Example](#query-by-example)
* [6.1. Introduction](#query-by-example.introduction)
* [6.2. Usage](#query-by-example.usage)
* [6.3. Example Matchers](#query-by-example.matchers)
* [7. Auditing](#auditing)
* [7.1. Basics](#auditing.basics)
* [7.1.1. Annotation-based Auditing Metadata](#auditing.annotations)
* [7.1.2. Interface-based Auditing Metadata](#auditing.interfaces)
* [7.1.3. `AuditorAware`](#auditing.auditor-aware)
* [7.1.4. `ReactiveAuditorAware`](#auditing.reactive-auditor-aware)
* [Appendices](#appendix)
* [Appendix A: Namespace reference](#repositories.namespace-reference)
* [The `<repositories />` Element](#populator.namespace-dao-config)
* [Appendix B: Populators namespace reference](#populator.namespace-reference)
* [The \<populator /\> element](#namespace-dao-config)
* [Appendix C: Repository query keywords](#repository-query-keywords)
* [Supported query method subject keywords](#appendix.query.method.subject)
* [Supported query method predicate keywords and modifiers](#appendix.query.method.predicate)
* [Appendix D: Repository query return types](#repository-query-return-types)
* [Supported Query Return Types](#appendix.query.return.types)
© 2008-2022 The original authors.
| |Copies of this document may be made for your own use and for distribution to others, provided that you do not charge any fee for such copies and further provided that each copy contains this Copyright Notice, whether distributed in print or electronically.|
|---|----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|
[](#preface)Preface
==========
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册