fix according to vale
This commit is contained in:
Родитель
364838c81d
Коммит
21f77e0b09
|
@ -63,3 +63,11 @@ exceptions:
|
|||
- YAML
|
||||
- ZIP
|
||||
- BOM
|
||||
- AMQP
|
||||
- AAD
|
||||
- POSIX
|
||||
- AKS
|
||||
- PEM
|
||||
- CRUD
|
||||
- SAS
|
||||
- JMS
|
||||
|
|
|
@ -5,3 +5,9 @@ level: warning
|
|||
scope: heading
|
||||
tokens:
|
||||
- '[A-Z]{2,4}'
|
||||
exceptions:
|
||||
- SDK
|
||||
- AD
|
||||
- SAS
|
||||
- BOM
|
||||
- JMS
|
||||
|
|
|
@ -16,3 +16,5 @@ MinAlertLevel = suggestion
|
|||
# You could enable all rules in the "Microsoft" style guide as follows:
|
||||
# BasedOnStyles = Microsoft
|
||||
BasedOnStyles = Microsoft
|
||||
|
||||
Microsoft.Headings = NO
|
||||
|
|
|
@ -19,7 +19,7 @@
|
|||
|
||||
=== DefaultAzureCredential
|
||||
|
||||
The `DefaultAzureCredential` is appropriate for most scenarios where the application is intended to ultimately be run in the Azure Cloud. This is because the DefaultAzureCredential combines credentials commonly used to authenticate when deployed, with credentials used to authenticate in a development environment.
|
||||
The `DefaultAzureCredential` is appropriate for most scenarios where the application is intended to be run in the Azure Cloud. This is because the DefaultAzureCredential combines credentials commonly used to authenticate when deployed, with credentials used to authenticate in a development environment.
|
||||
|
||||
NOTE: DefaultAzureCredential is intended to simplify getting started with the SDK by handling common scenarios with reasonable default behaviors. Developers who want more control or whose scenario isn't served by the default settings should use other credential types.
|
||||
|
||||
|
@ -33,44 +33,43 @@ image::https://user-images.githubusercontent.com/13167207/143148654-f3a37180-85e
|
|||
- Visual Studio Code - If the developer has authenticated via the Visual Studio Code Azure Account plugin, the `DefaultAzureCredential` will authenticate with that account.
|
||||
- Azure CLI - If the developer has authenticated an account via the Azure CLI az login command, the `DefaultAzureCredential` will authenticate with that account.
|
||||
|
||||
IMPORTANT: There could be some `ERROR` logs be printed out while the `DefaultAzureCredential` running the chain and trying to find the first available credential.It doesn't mean the `DefaultAzureCredential` is broken or unavailable.Meanwhile, we'll keep improving this logging experience.
|
||||
|
||||
TIP: Please refer to link:index.html#authorize-access-with-azure-active-directory[Authorize access with Azure AD] to make sure the security principal has been granted the sufficient permission to access the Azure resource.
|
||||
|
||||
|
||||
=== Managed Identity
|
||||
=== Managed identities
|
||||
|
||||
A common challenge for developers is the management of secrets and credentials used to secure communication between different components making up a solution. Managed identities eliminate the need for developers to manage credentials. Managed identities provide an identity for applications to use when connecting to resources that support Azure Active Directory (Azure AD) authentication. Applications may use the managed identity to obtain Azure AD tokens. For example, an application may use a managed identity to access resources like Azure Key Vault where developers can store credentials in a secure manner or to access storage accounts.
|
||||
|
||||
We encourage using manged identity instead of using connection string or key in your application for it's more secure and will save the trouble of managing secrets and credentials. In this case, `DefaultAzureCredential` could better serve the scenario of developing locally using account information stored locally and deploying the application to Azure Cloud and using Manged Identity.
|
||||
|
||||
==== Managed Identity Types
|
||||
==== Managed identity types
|
||||
There are two types of managed identities:
|
||||
|
||||
- *System-assigned* Some Azure services allow you to enable a managed identity directly on a service instance. When you enable a system-assigned managed identity an identity is created in Azure AD that is tied to the lifecycle of that service instance. So when the resource is deleted, Azure automatically deletes the identity for you. By design, only that Azure resource can use this identity to request tokens from Azure AD.
|
||||
- *System-assigned* Some Azure services allow you to enable a managed identity directly on a service instance. When you enable a system-assigned managed identity an identity is created in Azure AD that's tied to the lifecycle of that service instance. So when the resource is deleted, Azure automatically deletes the identity for you. By design, only that Azure resource can use this identity to request tokens from Azure AD.
|
||||
- *User-assigned* You may also create a managed identity as a standalone Azure resource. You can create a user-assigned managed identity and assign it to one or more instances of an Azure service. In the case of user-assigned managed identities, the identity is managed separately from the resources that use it.
|
||||
|
||||
NOTE: When a user-assigned managed identity is used, you can specify it by `spring.cloud.azure.credential.managed-identity-client-id` or `spring.cloud.azure.<azure-service>.credential.managed-identity-client-id`. No credential configuration is needed if a system-assigned managed identity is used.
|
||||
NOTE: When using a user-assigned managed identity, you can specify the client ID it by `spring.cloud.azure.credential.client-id` or `spring.cloud.azure.<azure-service>.credential.client-id`.
|
||||
|
||||
TIP: Please refer to link:index.html#authorize-access-with-azure-active-directory[Authorize access with Azure AD] to make sure the security principal has been granted the sufficient permission to access the Azure resource.
|
||||
|
||||
TIP: Please refer to link:{managed-identity}[What are managed identities for Azure resources?] for more details about manged identity.
|
||||
|
||||
=== Other Credential Types
|
||||
=== Other credential types
|
||||
|
||||
Developers who want more control or whose scenario isn't served by the `DefaultAzureCredential` or whose scenario isn't served by the default settings should use other credential types.
|
||||
|
||||
==== Authentication and authorization with Azure Active Directory
|
||||
==== Authentication and authorization with Azure AD
|
||||
With Azure AD, you can use Azure role-based access control (Azure RBAC) to grant permissions to a security principal, which may be a user, or an application service principal. When a security principal (a user, or an application) attempts to access an Azure resource, for example an Event Hubs resource, the request must be authorized. With Azure AD, access to a resource is a two-step process.
|
||||
|
||||
1. First, the security principal's identity is authenticated, and an OAuth 2.0 token is returned.
|
||||
2. Next, the token is passed as part of a request to the Azure service to authorize access to the specified resource.
|
||||
|
||||
===== Authenticate with Azure Active Directory
|
||||
For applications want to connect to resources that support Azure Active Directory (Azure AD) authentication, below configurations could be set with prefix `spring.cloud.azure.credential` or `spring.cloud.azure.<azure-service>.credential`
|
||||
===== Authenticate with Azure AD
|
||||
For applications want to connect to resources that support Azure AD authentication, below configurations could be set with prefix `spring.cloud.azure.credential` or `spring.cloud.azure.<azure-service>.credential`.
|
||||
|
||||
.Authentication properties
|
||||
[cols="<50,<50", options="header"]
|
||||
[cols="1,3", options="header"]
|
||||
|===
|
||||
|Property |Description
|
||||
|
||||
|
@ -81,7 +80,7 @@ For applications want to connect to resources that support Azure Active Director
|
|||
|Client secret to use when performing service principal authentication with Azure.
|
||||
|
||||
|client-certificate-path
|
||||
|Client secret to use when performing service principal authentication with Azure.
|
||||
|Path of a PEM certificate file to use when performing service principal authentication with Azure.
|
||||
|
||||
|client-certificate-password
|
||||
|Password of the certificate file.
|
||||
|
@ -92,16 +91,16 @@ For applications want to connect to resources that support Azure Active Director
|
|||
|password
|
||||
|Password to use when performing username/password authentication with Azure.
|
||||
|
||||
|managed-identity-client-id
|
||||
|Client id to use when using user-assigned managed identity or app registration (when working with AKS pod-identity) to authenticate with Azure.
|
||||
|managed-identity-enabled
|
||||
|Whether to enable managed identity.
|
||||
|===
|
||||
|
||||
TIP: To see the list of all Spring Cloud Azure related configuration properties please check link:appendix.html[the Appendix page].
|
||||
|
||||
[#authorize-access-with-azure-active-directory]
|
||||
===== Authorize access with Azure Active Directory
|
||||
===== Authorize access with Azure AD
|
||||
|
||||
The authorization step requires that one or more Azure roles be assigned to the security principal. The roles that are assigned to a security principal determine the permissions that the principal will have.
|
||||
The authorization step requires that one or more Azure roles be assigned to the security principal. The roles that are assigned to a security principal decide the permissions that the principal will have.
|
||||
|
||||
TIP: To see the list of all Azure built-in roles please check {azure-built-in-roles}[Azure built-in roles].
|
||||
|
||||
|
@ -154,15 +153,15 @@ NOTE: When using Spring Cloud Azure Resource Manager to get the connection strin
|
|||
|
||||
NOTE: A Key Vault access policy determines whether a given security principal, namely a user, application or user group, can perform different operations on Key Vault secrets, keys, and certificates. You can assign access policies using the Azure portal, the Azure CLI, or Azure PowerShell. Check {key-vault-access-policy}[here] for more details.
|
||||
|
||||
IMPORTANT: Azure Cosmos DB exposes 2 built-in role definitions: `Cosmos DB Built-in Data Reader` and `Cosmos DB Built-in Data Contributor`. However, Azure portal support for role management is not available yet. Check {cosmos-db-rbac}[here] for more details about the permission model, role definitions, and role assignment.
|
||||
IMPORTANT: Azure Cosmos DB exposes 2 built-in role definitions: `Cosmos DB Built-in Data Reader` and `Cosmos DB Built-in Data Contributor`. However, Azure portal support for role management isn't available yet. Check {cosmos-db-rbac}[here] for more details about the permission model, role definitions, and role assignment.
|
||||
|
||||
==== SAS Token
|
||||
==== SAS tokens
|
||||
It's also configurable for services support authenticating with Shared Access Signature (SAS). `spring.cloud.azure.<azure-service>.sas-token` is the property to configure. For example, using `spring.cloud.azure.storage.blob.sas-token` to authenticate to Storage Blob service.
|
||||
|
||||
|
||||
==== Connection String
|
||||
==== Connection strings
|
||||
|
||||
Connection string are supported by some Azure services to provide connection information as well as credentials. To connect to those Azure services using connection string, just configure `spring.cloud.azure.<azure-service>.connection-string` will do. For example, `spring.cloud.azure.eventhubs.connection-string` to connect to Event Hubs service.
|
||||
Connection strings are supported by some Azure services to provide connection information as well as credentials. To connect to those Azure services using a connection string, just configure `spring.cloud.azure.<azure-service>.connection-string` will do. For example, `spring.cloud.azure.eventhubs.connection-string` to connect to Event Hubs service.
|
||||
|
||||
|
||||
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
== Auto Configure Azure SDK Clients
|
||||
== Autoconfigure Azure SDK clients
|
||||
|
||||
Spring Boot greatly simplifies the Spring Cloud Azure experience. Spring Cloud Azure Starters are a set of convenient dependency descriptors to include in your application. Our starters handle the object instantiation and configuration logic, so you don’t have to. Every starter depends on the Spring Cloud Azure starter to provide critical bits of configuration, like the Azure Cloud environment and authentication information. You can configure these as properties in, for example, a yaml file:
|
||||
Spring Boot simplifies the Spring Cloud Azure development experience. Spring Cloud Azure starters are a set of convenient dependency descriptors to include in your application. They handle the object instantiation and configuration logic, so you don’t have to. Every starter depends on the `spring-cloud-azure-starter` to provide critical bits of configuration, like the Azure cloud environment and authentication information. You can configure these as properties in, for example, a yaml file:
|
||||
|
||||
[source,yaml]
|
||||
----
|
||||
|
@ -9,28 +9,31 @@ spring:
|
|||
azure:
|
||||
profile:
|
||||
tenant-id: ${AZURE_TENANT_ID}
|
||||
cloud: Azure
|
||||
cloud-type: Azure # <1>
|
||||
credential:
|
||||
client-id: ${AZURE_CLIENT_ID}
|
||||
----
|
||||
<1> `cloud-type` is optional for it has default value set to `Azure`.
|
||||
|
||||
* `cloud` is optional.
|
||||
|
||||
These properties are optional and, if not specified, Spring Boot will attempt to automatically find them for you. For details on how Spring Boot finds these properties, refer to the documentation.
|
||||
These properties are optional and, if not specified, Spring Boot will try to automatically find them for you. For details on how Spring Boot finds these properties, refer to the documentation.
|
||||
|
||||
|
||||
=== Dependency Setup
|
||||
There are two ways to use Spring Cloud Azure starters, one is using Azure SDKs with this `spring-cloud-azure-starter` dependency
|
||||
There are two ways to use Spring Cloud Azure starters. One is using Azure SDKs with this `spring-cloud-azure-starter` dependency. For example with Cosmos DB:
|
||||
|
||||
[source,xml]
|
||||
----
|
||||
<dependency>
|
||||
<groupId>com.azure</groupId>
|
||||
<artifactId>azure-cosmos</artifactId>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>com.azure.spring</groupId>
|
||||
<artifactId>spring-cloud-azure-starter</artifactId>
|
||||
</dependency>
|
||||
----
|
||||
|
||||
or without adding Azure SDK dependencies and including the Spring Cloud Azure Starter for each Service directly. For example with Cosmos DB
|
||||
Or including the Spring Cloud Azure Starter directly without adding Azure SDK dependencies. For example with Cosmos DB:
|
||||
|
||||
[source,xml]
|
||||
----
|
||||
|
@ -40,19 +43,19 @@ or without adding Azure SDK dependencies and including the Spring Cloud Azure St
|
|||
</dependency>
|
||||
----
|
||||
|
||||
TIP: Please refer to link:index.html#starter-dependencies[Starter Dependencies] for the list of starters we support.
|
||||
TIP: Please refer to link:index.html#starter-dependencies[Starter Dependencies] for the list of starters Spring Cloud Azure supports.
|
||||
|
||||
=== Configuration
|
||||
|
||||
NOTE: If you choose to use a security principal to authenticate and authorize with Azure Active Directory for accessing an Azure resource, please refer to link:index.html#authorize-access-with-azure-active-directory[Authorize access with Azure AD] to make sure the security principal has been granted the sufficient permission to access the Azure resource.
|
||||
|
||||
Configuration properties for each Azure service are under prefix `spring.cloud.azure`.
|
||||
Configuration properties for each Azure service are under prefix `spring.cloud.azure.<azure-service>`.
|
||||
|
||||
TIP: To see the list of all Spring Cloud Azure related configuration properties please check link:appendix.html[the Appendix page].
|
||||
|
||||
=== Basic Usage
|
||||
|
||||
Adding below properties to your `application.yaml` will autoconfigure the Cosmos Client for you, both `CosmosClient` and `CosmosAsyncClient` are available in the context and could be autowired.
|
||||
Adding below properties to your `application.yaml` will autoconfigure the Cosmos clients for you, both `CosmosClient` and `CosmosAsyncClient` are available in the context and could be autowired.
|
||||
|
||||
[source,yaml]
|
||||
----
|
||||
|
|
|
@ -1,56 +1,57 @@
|
|||
[#configuration]
|
||||
== Configuration
|
||||
|
||||
Most of Azure Service SDKs could be divided into two categories by transport type, HTTP-based and AMQP-based. There are properties that are common to all SDKs such as authentication principals and Azure environment settings. Or common to HTTP-based clients, such as logging level to log http requests and responses. In Spring Cloud Azure 4.0 we added five common categories of configuration properties, which could be specified to each Azure service.
|
||||
Most of Azure SDKs could be divided into two categories by transport type, HTTP-based and AMQP-based. There are properties that are common to all SDKs such as authentication principals and Azure environment settings. Or common to HTTP-based clients, such as logging level to log http requests and responses. Spring Cloud Azure 4.0 provides five common categories of configuration properties, which could be specified to each Azure service.
|
||||
|
||||
.Service common properties
|
||||
[cols="1,3", options="header"]
|
||||
[cols="2,3", options="header"]
|
||||
|===
|
||||
|Property |Description
|
||||
|
||||
|*spring.cloud.azure.<azure-service>*.client
|
||||
|spring.cloud.azure.*_<azure-service>_.client*
|
||||
|To configure the transport clients underneath one Azure service SDK.
|
||||
|
||||
|*spring.cloud.azure.<azure-service>*.credential
|
||||
|spring.cloud.azure.*_<azure-service>_.credential*
|
||||
|To configure how to authenticate with Azure Active Directory for one Azure service SDK.
|
||||
|
||||
|*spring.cloud.azure.<azure-service>*.profile
|
||||
|spring.cloud.azure.*_<azure-service>_.profile*
|
||||
|To configure the Azure cloud environment for one Azure service SDK.
|
||||
|
||||
|*spring.cloud.azure.<azure-service>*.proxy
|
||||
|spring.cloud.azure.*_<azure-service>_.proxy*
|
||||
|To configure the proxy options for one Azure service SDK.
|
||||
|
||||
|*spring.cloud.azure.<azure-service>*.retry
|
||||
|To configure the retry options apply to one Azure service SDK.
|
||||
|===
|
||||
|spring.cloud.azure.*_<azure-service>_.retry*
|
||||
|To configure the retry options apply to one Azure service SDK. The retry options has supported part of the SDKs, there's no `spring.cloud.azure.cosmos.retry`.
|
||||
|===
|
||||
|
||||
There are some properties that could be shared among different Azure services, for example using the same service principal to access Azure Cosmos DB and Azure Event Hubs. Spring Cloud Azure 4.0 allows developers to define properties that apply to all Azure SDKs in the namespace `spring.cloud.azure`.
|
||||
|
||||
There are some properties that could be shared among different Azure services, for example using the same service principal to access Azure Cosmos DB and Azure Event Hubs. Spring Cloud Azure 4.0 allows developers to define properties that apply to all Azure SDKs with the prefix `spring.cloud.azure`.
|
||||
|
||||
.Global properties
|
||||
[cols="1,3", options="header"]
|
||||
|===
|
||||
|Property |Description
|
||||
|
||||
|*spring.cloud.azure*.client
|
||||
|spring.cloud.azure.*client*
|
||||
|To configure the transport clients apply to all Azure SDKs by default.
|
||||
|
||||
|*spring.cloud.azure*.credential
|
||||
|spring.cloud.azure.*credential*
|
||||
|To configure how to authenticate with Azure Active Directory for all Azure SDKs by default.
|
||||
|
||||
|*spring.cloud.azure*.profile
|
||||
|spring.cloud.azure.*profile*
|
||||
|To configure the Azure cloud environment for all Azure SDKs by default.
|
||||
|
||||
|*spring.cloud.azure*.proxy
|
||||
|spring.cloud.azure.*proxy*
|
||||
|To configure the proxy options apply to all Azure SDK clients by default.
|
||||
|
||||
|*spring.cloud.azure*.retry
|
||||
|spring.cloud.azure.*retry*
|
||||
|To configure the retry options apply to all Azure SDK clients by default.
|
||||
|===
|
||||
|
||||
|
||||
NOTE: Properties configured under each Azure service will override the global configurations.
|
||||
|
||||
The configuration properties' prefixes have been unified to `spring.cloud.azure` namespace since Spring Cloud Azure 4.0, it will make configuration properties more consistent and more intuitive. Here's a quick review of the prefixes of supported Azure services.
|
||||
Spring Cloud Azure unifies configuration properties' prefixes to `spring.cloud.azure` since 4.0, which will make configuration properties more consistent and more intuitive. Here's a quick review of the prefixes of each supported Azure service.
|
||||
|
||||
.Service specific properties
|
||||
[cols="<50,<50", options="header"]
|
||||
|
@ -58,29 +59,29 @@ The configuration properties' prefixes have been unified to `spring.cloud.azure`
|
|||
|Azure Service |Configuration Property Prefix
|
||||
|
||||
|Azure App Configuration
|
||||
|*spring.cloud.azure*.appconfiguration
|
||||
|spring.cloud.azure.*appconfiguration*
|
||||
|
||||
|Azure Cosmos DB
|
||||
|*spring.cloud.azure*.cosmos
|
||||
|spring.cloud.azure.*cosmos*
|
||||
|
||||
|Azure Event Hubs
|
||||
|*spring.cloud.azure*.eventhubs
|
||||
|spring.cloud.azure.*eventhubs*
|
||||
|
||||
|Azure Key Vault Certificate
|
||||
|*spring.cloud.azure*.keyvault.certificate
|
||||
|spring.cloud.azure.*keyvault.certificate*
|
||||
|
||||
|Azure Key Vault Secret
|
||||
|*spring.cloud.azure*.keyvault.secret
|
||||
|spring.cloud.azure.*keyvault.secret*
|
||||
|
||||
|Azure Service Bus
|
||||
|*spring.cloud.azure*.servicebus
|
||||
|spring.cloud.azure.*servicebus*
|
||||
|
||||
|Azure Storage Blob
|
||||
|*spring.cloud.azure*.storage.blob
|
||||
|Azure Blob Storage
|
||||
|spring.cloud.azure.*storage.blob*
|
||||
|
||||
|Azure Storage File Share
|
||||
|*spring.cloud.azure*.storage.fileshare
|
||||
|spring.cloud.azure.*storage.fileshare*
|
||||
|
||||
|Azure Storage Queue
|
||||
|*spring.cloud.azure*.storage.queue
|
||||
|Azure Queue Storage
|
||||
|spring.cloud.azure.*storage.queue*
|
||||
|===
|
||||
|
|
|
@ -11,53 +11,64 @@
|
|||
<dependency>
|
||||
<groupId>com.azure.spring</groupId>
|
||||
<artifactId>spring-cloud-azure-dependencies</artifactId>
|
||||
<version>version</version>
|
||||
<version>version</version> <!--1-->
|
||||
<type>pom</type>
|
||||
<scope>import</scope>
|
||||
</dependency>
|
||||
</dependencies>
|
||||
</dependencyManagement>
|
||||
----
|
||||
|
||||
The version for spring-cloud-azure-dependencies is {project-version}.
|
||||
<1> The version for spring-cloud-azure-dependencies is {project-version}.
|
||||
|
||||
[#starter-dependencies]
|
||||
==== Starter Dependencies
|
||||
|
||||
Spring Cloud Azure Starters are a set of convenient dependency descriptors to include in your application.Each starter contains all the dependencies and transitive dependencies needed to begin using their corresponding Spring Cloud Azure module.It boosts your Spring Boot application development with Azure services.
|
||||
Spring Cloud Azure Starters are a set of convenient dependency descriptors to include in your application. Each starter includes all the dependencies and transitive dependencies needed to begin using their corresponding Spring Cloud Azure modules. They boost your Spring Boot application development with Azure services.
|
||||
|
||||
For example, if you want to get started using Spring and Azure Cosmos DB for data persistence, include the `spring-cloud-azure-starter-cosmos` dependency in your project.
|
||||
For example, if you want to get started using Azure Cosmos DB for data persistence, include the `spring-cloud-azure-starter-cosmos` dependency in your project.
|
||||
|
||||
The following application starters are provided by Spring Cloud Azure under the `com.azure.spring` group:
|
||||
Spring Cloud Azure provides the following starters under the `com.azure.spring` group:
|
||||
|
||||
.Spring Cloud Azure starters
|
||||
[cols="2*",options="header"]
|
||||
[cols="<50,<50",options="header"]
|
||||
|===
|
||||
|Name |Description
|
||||
|spring-cloud-azure-starter
|
||||
|Core starter, including auto-configuration support
|
||||
|Core starter, including autoconfiguration support
|
||||
|
||||
|spring-cloud-azure-starter-active-directory
|
||||
|Starter for using Azure Active Directory with Spring Security
|
||||
|
||||
|spring-cloud-azure-starter-active-directory-b2c
|
||||
|Starter for using Azure Active Directory B2C with Spring Security
|
||||
|
||||
|spring-cloud-azure-starter-appconfiguration
|
||||
|Starter for using Azure App Configuration
|
||||
|
||||
|spring-cloud-azure-starter-cosmos
|
||||
|Starter for using Azure Cosmos DB
|
||||
|
||||
|spring-cloud-azure-starter-eventhubs
|
||||
|Starter for using Azure Event Hubs
|
||||
|
||||
|spring-cloud-azure-starter-keyvault-secrets
|
||||
|Starter for using Azure Key Vault Secrets
|
||||
|
||||
|spring-cloud-azure-starter-servicebus
|
||||
|Starter for using Azure Service Bus
|
||||
|
||||
|spring-cloud-azure-starter-servicebus-jms
|
||||
|Starter for using Azure Service Bus and JMS
|
||||
|
||||
|spring-cloud-azure-starter-storage-blob
|
||||
|Starter for using Azure Storage Blob
|
||||
|
||||
|spring-cloud-azure-starter-storage-file-share
|
||||
|Starter for using Azure Storage File Share
|
||||
|
||||
|spring-cloud-azure-starter-storage-queue
|
||||
|Starter for using Azure Storage Queue
|
||||
|
||||
|spring-cloud-azure-starter-actuator
|
||||
|Starter for using Spring Boot’s Actuator which provides production ready features
|
||||
|===
|
||||
|
@ -65,7 +76,7 @@ The following application starters are provided by Spring Cloud Azure under the
|
|||
Below are starters for **Spring Data** support:
|
||||
|
||||
.Spring Data related starters
|
||||
[cols="2*", options="header"]
|
||||
[cols="<50,<50", options="header"]
|
||||
|===
|
||||
|Name |Description
|
||||
|spring-cloud-azure-starter-data-cosmos
|
||||
|
@ -75,7 +86,7 @@ Below are starters for **Spring Data** support:
|
|||
Below are starters for **Spring Integration** support:
|
||||
|
||||
.Spring Integration related starters
|
||||
[cols="2*", options="header"]
|
||||
[cols="<50,<50", options="header"]
|
||||
|===
|
||||
|Name |Description
|
||||
|spring-cloud-azure-starter-integration-eventhubs
|
||||
|
@ -89,7 +100,7 @@ Below are starters for **Spring Integration** support:
|
|||
Below are starters for **Spring Cloud Stream** support:
|
||||
|
||||
.Spring Cloud Stream related starters
|
||||
[cols="2*", options="header"]
|
||||
[cols="<50,<50", options="header"]
|
||||
|===
|
||||
|Name |Description
|
||||
|spring-cloud-azure-starter-stream-eventhubs
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
== Production Ready
|
||||
|
||||
We’ve added health indicators for App Configuration, Event Hubs, Cosmos, Key Vault, Storage Blob, Storage Queue, Storage File, as well as Spring Cloud Sleuth support for all HTTP-based Azure SDKs. As an example, you now can prob if storage blob is up or down via Spring Boot actuator endpoint, as well as track dependencies and latencies going from your application to Key Vault.
|
||||
Spring Cloud Azure 4.0 supports health indicators for App Configuration, Event Hubs, Cosmos, Key Vault, Storage Blob, Storage Queue, and Storage File Share. It also provides integrations with Spring Cloud Sleuth for all HTTP-based Azure SDKs. As an example, you now can prob if storage blob is up or down via Spring Boot actuator endpoint, as well as track dependencies and latencies going from your application to Key Vault.
|
||||
|
||||
=== Enable Health Indicator
|
||||
|
||||
|
@ -14,18 +14,18 @@ Add the Spring Cloud Azure Actuator Starter dependency. This dependency will als
|
|||
</dependency>
|
||||
----
|
||||
|
||||
.Configurable properties to enable or disable health indicators for each Azure services
|
||||
.Configurable properties to enable or disable health indicators for each Azure service
|
||||
[cols="<30,<70", options="header"]
|
||||
|===
|
||||
|Azure Service |Property
|
||||
|App Configuration |*management.health.azure*-appconfiguration.enabled
|
||||
|Cosmos DB |*management.health.azure*-cosmos.enabled
|
||||
|Event Hubs |*management.health.azure*-eventhubs.enabled
|
||||
|Key Vault |*management.health.azure*-keyvault.enabled
|
||||
|Storage|*management.health.azure*-storage.enabled
|
||||
|App Configuration |management.health.*azure-appconfiguration*.enabled
|
||||
|Cosmos DB |management.health.*azure-cosmos*.enabled
|
||||
|Event Hubs |management.health.*azure-eventhubs*.enabled
|
||||
|Key Vault |management.health.*azure-keyvault*.enabled
|
||||
|Storage|management.health.*azure-storage*.enabled
|
||||
|===
|
||||
|
||||
NOTE: Calling the health endpoint of Azure services may cause extra charge. For example, calling `http://HOST_NAME:{port}/actuator/health/cosmos` to get the Cosmos DB health info, it will calculate https://docs.microsoft.com/azure/cosmos-db/request-units[RUs].
|
||||
IMPORTANT: Calling the health endpoint of Azure services may cause extra charge. For example, calling `http://HOST_NAME:{port}/actuator/health/cosmos` to get the Cosmos DB health info, it will calculate https://docs.microsoft.com/azure/cosmos-db/request-units[RUs].
|
||||
|
||||
=== Enable Sleuth
|
||||
|
||||
|
@ -39,6 +39,6 @@ Add the Spring Cloud Azure Trace Sleuth dependency when you want to trace Azure
|
|||
</dependency>
|
||||
----
|
||||
|
||||
NOTE: Only HTTP-based Azure SDK clients are supported now, for example, Eventhub and ServiceBus with AMQP transport are currently not supported, we recommend to use https://docs.microsoft.com/azure/azure-monitor/app/app-insights-overview[Azure Application Insight] for such requirement.
|
||||
NOTE: Only HTTP-based Azure SDK clients are supported now, for example, Eventhub and ServiceBus with AMQP transport are currently not supported, we recommend to use https://docs.microsoft.com/azure/azure-monitor/app/app-insights-overview[Azure Application Insights] for such requirement.
|
||||
|
||||
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
== Resource Handling
|
||||
|
||||
Spring project provides link:https://docs.spring.io/spring-framework/docs/current/reference/html/core.html#resources[Spring Resources] abstraction to access a number of low-level resources. It provides interfaces like `Resource`, `ResourceLoader` and `ResourcePatternResolver`. Spring Cloud Azure implements these interfaces for Azure Storage services which allows you to interact with Azure storage Blob and File Share using Spring programming model. It provides `spring-cloud-azure-starter-storage-blob` and `spring-cloud-azure-starter-storage-file-share` to auto-configure Azure Storage Blob and Azure Storage File Share.
|
||||
Spring project provides link:https://docs.spring.io/spring-framework/docs/current/reference/html/core.html#resources[Spring Resources] abstraction to access a number of low-level resources. It provides interfaces like `Resource`, `ResourceLoader` and `ResourcePatternResolver`. Spring Cloud Azure implements these interfaces for Azure Storage services which allows you to interact with Azure storage Blob and File Share using Spring programming model. It provides `spring-cloud-azure-starter-storage-blob` and `spring-cloud-azure-starter-storage-file-share` to autoconfigure Azure Storage Blob and Azure Storage File Share.
|
||||
|
||||
|
||||
.Azure Storage related libraries.
|
||||
|
@ -11,7 +11,7 @@ Spring project provides link:https://docs.spring.io/spring-framework/docs/curren
|
|||
|Description
|
||||
|
||||
|spring-cloud-azure-starter-storage-blob
|
||||
|Azure Blobs
|
||||
|Azure Blob Storage
|
||||
|Allows unstructured data to be stored and accessed at a massive scale in block blobs.
|
||||
|
||||
|spring-cloud-azure-starter-storage-file-share
|
||||
|
@ -48,19 +48,19 @@ NOTE: If you choose to use a security principal to authenticate and authorize wi
|
|||
|
||||
|*spring.cloud.azure.storage.blob*.enabled
|
||||
|true
|
||||
|Whether an Azure Blob Storage Service is enabled
|
||||
|Whether to enable Azure Blob Storage.
|
||||
|
||||
|*spring.cloud.azure.storage.blob*.endpoint
|
||||
|
|
||||
|Uri to connect Azure Blob Storage
|
||||
|Endpoint for Azure Storage service.
|
||||
|
||||
|*spring.cloud.azure.storage.blob*.account-key
|
||||
|
|
||||
|Private key to connect Azure Blob Storage
|
||||
|Private key to connect Azure Blob Storage.
|
||||
|
||||
|*spring.cloud.azure.storage.blob*.account-name
|
||||
|
|
||||
|Azure Storage Account Name
|
||||
|Azure Storage Account Name.
|
||||
|===
|
||||
|
||||
.Configurable properties of spring-cloud-azure-starter-storage-file-share
|
||||
|
@ -70,19 +70,19 @@ NOTE: If you choose to use a security principal to authenticate and authorize wi
|
|||
|
||||
|*spring.cloud.azure.storage.fileshare*.enabled
|
||||
|true
|
||||
|Whether Azure File Storage Service is enabled
|
||||
|Whether to enable Azure Storage File Share.
|
||||
|
||||
|*spring.cloud.azure.storage.fileshare*.endpoint
|
||||
|
|
||||
|Uri to connect Azure File Storage
|
||||
|Endpoint for Azure Storage service.
|
||||
|
||||
|*spring.cloud.azure.storage.fileshare*.account-key
|
||||
|
|
||||
|Private key to connect Azure File Storage
|
||||
|Private key to connect Azure Storage File Share.
|
||||
|
||||
|*spring.cloud.azure.storage.fileshare*.account-name
|
||||
|
|
||||
|Azure Storage Account Name
|
||||
|Azure Storage Account Name.
|
||||
|===
|
||||
|
||||
|
||||
|
@ -99,32 +99,36 @@ spring:
|
|||
storage:
|
||||
blob:
|
||||
account-name: ${STORAGE_ACCOUNT_NAME}
|
||||
account-key: ${STORAGE_ACCOUNT_PRIVATE_KEY}
|
||||
account-key: ${STORAGE_ACCOUNT_KEY}
|
||||
endpoint: ${STORAGE_BLOB_ENDPOINT}
|
||||
fileshare:
|
||||
account-name: ${STORAGE_ACCOUNT_NAME}
|
||||
account-key: ${STORAGE_ACCOUNT_PRIVATE_KEY}
|
||||
account-key: ${STORAGE_ACCOUNT_KEY}
|
||||
endpoint: ${STORAGE_FILESHARE_ENDPOINT}
|
||||
----
|
||||
|
||||
==== Get a resource
|
||||
|
||||
===== Get a resource with @Value
|
||||
You can use the annotation of `@Value("azure-blob://[your-container-name]/[your-blob-name]")` to autowire a blob Resource.
|
||||
You can use the annotation of `@Value("azure-blob://[your-container-name]/[your-blob-name]")` to autowire a blob resource.
|
||||
|
||||
[source,java]
|
||||
----
|
||||
@Value("azure-blob://[your-container-name]/[your-blob-name]")
|
||||
private Resource storageResource;
|
||||
private Resource storageBlobResource;
|
||||
----
|
||||
|
||||
You can use the annotation of @Value("azure-file://[your-fileshare-name]/[your-file-name]") to autowire a file Resource.
|
||||
You can use the annotation of @Value("azure-file://[your-fileshare-name]/[your-file-name]") to autowire a file resource.
|
||||
|
||||
[source,java]
|
||||
----
|
||||
@Value("azure-file://[your-fileshare-name]/[your-file-name]")
|
||||
private Resource storageResource;
|
||||
private Resource storageFileResource;
|
||||
----
|
||||
|
||||
===== Get a resource with ResourceLoader
|
||||
|
||||
[source,java]
|
||||
----
|
||||
@Autowired
|
||||
private ResourceLoader resourceLoader;
|
||||
|
@ -136,11 +140,12 @@ Resource storageFileResource = resourceLoader.getResource("azure-file://[your-fi
|
|||
----
|
||||
|
||||
===== Get resources by searching pattern
|
||||
You can use implementation class `AzureStorageBlobProtocolResolver` of `ResourcePatternResolver` to search `blob` resource, and `AzureStorageFileProtocolResolver` of `ResourcePatternResolver` to search `file` resource
|
||||
You can use implementation class of `ResourcePatternResolver` to search resources. Using `AzureStorageBlobProtocolResolver` to search `blob` resources, and `AzureStorageFileProtocolResolver` to search `file` resources.
|
||||
|
||||
- Pattern search, the **searchPattern** should start with `azure-blob://` or `azure-file://`. Such as `azure-blob://**/**`, it means list all blobs in all containers; `azure-blob://demo-container/**`, it means list all blobs in the demo-container container, including any sub-folder.
|
||||
- Pattern search, the **searchPattern** should start with `azure-blob://` or `azure-file://`. Such as `azure-blob://+++**+++/+++**+++`, it means list all blobs in all containers; `azure-blob://demo-container/**`, it means list all blobs in the demo-container container, including any sub-folders.
|
||||
- Location search, the **searchLocation** should start with `azure-blob://` or `azure-file://`, the remaining file path should exist, otherwise an exception will be thrown.
|
||||
|
||||
[source,java]
|
||||
----
|
||||
@Autowired
|
||||
private AzureStorageBlobProtocolResolver azureStorageBlobProtocolResolver;
|
||||
|
@ -158,27 +163,31 @@ Resource[] fileTextResources = azureStorageFileProtocolResolver.getResources("az
|
|||
|
||||
==== Handling with resource
|
||||
|
||||
===== Download data from specific resource.
|
||||
===== Download data from specific resource
|
||||
|
||||
You can download a resource from Azure Blob or file storage with the `getInputStream()` method of Resource.
|
||||
|
||||
[source,java]
|
||||
----
|
||||
@Value("azure-blob://[your-container-name]/[your-blob-name]")
|
||||
private Resource storageBlobResource;
|
||||
|
||||
@Value("azure-file://[your-fileshare-name]/[your-file-name]")
|
||||
private Resource storageFileResource;
|
||||
|
||||
....
|
||||
|
||||
// download data as stream from blob resource
|
||||
InputStream inputblobStream = storageBlobResource.getInputStream();
|
||||
// download data as stream from file resource
|
||||
InputStream inputfileStream = storageFileResource.getInputStream();
|
||||
----
|
||||
|
||||
===== Upload data to specific resource.
|
||||
===== Upload data to specific resource
|
||||
|
||||
You can upload to a resource to Azure Blob or file storage by casting the Spring `Resource` to `WritableResource`.
|
||||
|
||||
[source,java]
|
||||
----
|
||||
@Value("azure-blob://[your-container-name]/[your-blob-name]")
|
||||
private Resource storageBlobResource;
|
||||
|
@ -196,7 +205,6 @@ try (OutputStream blobos = ((WritableResource) this.storageBlobResource).getOutp
|
|||
try (OutputStream fileos = ((WritableResource) this.storageFileResource).getOutputStream()) {
|
||||
fileos.write(data.getBytes());
|
||||
}
|
||||
|
||||
----
|
||||
|
||||
==== Multipart upload
|
||||
|
|
|
@ -1,7 +1,6 @@
|
|||
== Resource Manager
|
||||
|
||||
Connect to Azure Resources for All Azure SDKs service, which Spring Cloud used.
|
||||
Construct `TokenCredential` by using various credential information, and then construct `AzureResourceManager` to help Azure SDKs Client to authenticate and authorize.
|
||||
Azure Resource Manager (ARM) is the deployment and management service for Azure. It provides a management layer that enables you to create, update, and delete resources in your Azure account. Spring Cloud Azure Resourcemanger can help provision resources or retrieve resource metadata.
|
||||
|
||||
=== Dependency Setup
|
||||
|
||||
|
@ -22,14 +21,14 @@ NOTE: If you choose to use a security principal to authenticate and authorize wi
|
|||
|===
|
||||
|Property |Description
|
||||
|*spring.cloud.azure.resource-manager*.enabled |Whether the Resource Manager is enabled. Default is true.
|
||||
|*spring.cloud.azure.credential*.client-certificate-password |Password of the certificate file.
|
||||
|*spring.cloud.azure.credential*.client-certificate-path |Path of a PEM certificate file to use when performing service principal authentication with Azure.
|
||||
|*spring.cloud.azure.credential*.client-id |Client id to use when performing service principal authentication with Azure.
|
||||
|*spring.cloud.azure.credential*.client-secret |Client secret to use when performing service principal authentication with Azure.
|
||||
|*spring.cloud.azure.credential*.managed-identity-client-id |Client id to use when using managed identity to authenticate with Azure.
|
||||
|*spring.cloud.azure.credential*.client-certificate-path |Path of a PEM certificate file to use when performing service principal authentication with Azure.
|
||||
|*spring.cloud.azure.credential*.client-certificate-password |Password of the certificate file.
|
||||
|*spring.cloud.azure.credential*.username |Username to use when performing username/password authentication with Azure.
|
||||
|*spring.cloud.azure.credential*.password |Password to use when performing username/password authentication.
|
||||
|*spring.cloud.azure.profile*.cloud |Name of the Azure cloud to connect to.
|
||||
|*spring.cloud.azure.credential*.managed-identity-enabled |Whether to enable managed identity.
|
||||
|*spring.cloud.azure.profile*.cloud-type |Name of the Azure cloud to connect to.
|
||||
|*spring.cloud.azure.profile*.environment.active-directory-endpoint |The Azure Active Directory endpoint to connect to for authentication.
|
||||
|*spring.cloud.azure.profile*.subscription-id |Subscription id to use when connecting to Azure resources.
|
||||
|*spring.cloud.azure.profile*.tenant-id |Tenant id for Azure resources.
|
||||
|
@ -37,7 +36,7 @@ NOTE: If you choose to use a security principal to authenticate and authorize wi
|
|||
|
||||
=== Basic Usage
|
||||
|
||||
Azure Resource Manger helps the Azure SDK client to complete authentication and authorization. It can be integrated into a specific Spring Cloud Azure Starter and work together, or it can be used with Spring Cloud Azure auto-configuration modules and third-party libraries to complete authentication, such as: <<Kafka Support>>, <<Redis Support>>.
|
||||
Spring Cloud Azure Resourcemanger can work together with specific Spring Cloud Azure starters to retrieve connection information, such as connection strings, to connect to Azure services. It can also together with `spring-cloud-azure-starter` and third-party libraries to retrieve metadata like username/password, to complete authentication, such as: <<Kafka Support>>, <<Redis Support>>.
|
||||
|
||||
=== Samples
|
||||
|
||||
|
|
|
@ -307,7 +307,7 @@ spring:
|
|||
mode: MANUAL
|
||||
----
|
||||
|
||||
- For credentials as MSI, configure below properties in application.yml:
|
||||
- For credentials as managed identites, configure below properties in application.yml:
|
||||
|
||||
[source, yaml]
|
||||
----
|
||||
|
@ -315,7 +315,8 @@ spring:
|
|||
cloud:
|
||||
azure:
|
||||
credential:
|
||||
managed-identity-client-id: ${AZURE_MANAGED_IDENTITY_CLIENT_ID}
|
||||
managed-identity-enabled: true
|
||||
client-id: ${AZURE_MANAGED_IDENTITY_CLIENT_ID} # Only needed when using a user-assigned managed identity
|
||||
eventhubs:
|
||||
namespace: ${EVENTHUB_NAMESPACE}
|
||||
processor:
|
||||
|
@ -516,7 +517,7 @@ public void producerError(Message<?> message) {
|
|||
See the <<si-eh-headers, Event Hubs message headers>> for the basic message headers supported.
|
||||
|
||||
===== Multi Binder Support
|
||||
Connection to mutiple Event Hubs namespaces is also supported by using multi binders.This sample takes connection string as example. Credentials of service priciple and MSI are also supported, users can set related properties in each binder's environment settings.
|
||||
Connection to mutiple Event Hubs namespaces is also supported by using multi binders.This sample takes connection string as example. Credentials of service principals and managed identities are also supported, users can set related properties in each binder's environment settings.
|
||||
|
||||
Step 1. To use multiple binders of EventHubs, we need to configure below properties in application.yml
|
||||
[source,yaml]
|
||||
|
@ -865,14 +866,15 @@ spring:
|
|||
entity-type: queue # set as "topic" if you use Service Bus Topic
|
||||
----
|
||||
|
||||
- For credentials as MSI, configure below properties in application.yml:
|
||||
- For credentials as managed identities, configure below properties in application.yml:
|
||||
[source, yaml]
|
||||
----
|
||||
spring:
|
||||
cloud:
|
||||
azure:
|
||||
credential:
|
||||
managed-identity-client-id: ${MANAGED_IDENTITY_CLIENT_ID}
|
||||
managed-identity-enabled: true
|
||||
client-id: ${MANAGED_IDENTITY_CLIENT_ID} # Only needed when using a user-assigned managed identity
|
||||
servicebus:
|
||||
namespace: ${SERVICEBUS_NAMESPACE}
|
||||
stream:
|
||||
|
@ -1020,7 +1022,7 @@ See the <<si-sb-headers, Service Bus message headers>> for the basic message hea
|
|||
NOTE: When setting the partiton key, the priority of message header is higher than Spring Cloud Stream property. So `spring.cloud.stream.bindings.<binding-name>.producer.partition-key-expression` will take effect only when none of the headers of `ServiceBusMessageHeaders#SESSION_ID`, `ServiceBusMessageHeaders#PARTITION_KEY`, `AzureHeaders#PARTITION_KEY` is configured.
|
||||
|
||||
===== Multi Binder Support
|
||||
Connection to mutiple Service Bus namespaces is also supported by using multi binders.This sample takes connection string as example. Credentials of service priciple and MSI are also supported, users can set related properties in each binder's environment settings.
|
||||
Connection to mutiple Service Bus namespaces is also supported by using multi binders.This sample takes connection string as example. Credentials of service principals and managed identities are also supported, users can set related properties in each binder's environment settings.
|
||||
|
||||
Step 1. To use multiple binders of ServiceBus, we need to configure below properties in application.yml
|
||||
[source,yaml]
|
||||
|
|
|
@ -58,9 +58,9 @@ NOTE: If you choose to use a security principal to authenticate and authorize wi
|
|||
|
|
||||
|Client secret to use when performing service principal authentication with Azure.
|
||||
|
||||
|*spring.cloud.azure.cosmos*.credential.managed-identity-client-id
|
||||
|*spring.cloud.azure.cosmos*.credential.managed-identity-enabled
|
||||
|
|
||||
|Client id to use when using managed identity to authenticate with Azure.
|
||||
|Whether to enable managed identity.
|
||||
|
||||
|*spring.cloud.azure.cosmos*.credential.password
|
||||
|
|
||||
|
|
|
@ -146,14 +146,15 @@ spring:
|
|||
account-key: ${CHECKPOINT-ACCESS-KEY}
|
||||
----
|
||||
|
||||
* For credentials as MSI, configure below properties in `application.yml`:
|
||||
* For credentials as managed identities, configure below properties in `application.yml`:
|
||||
[source,yaml]
|
||||
----
|
||||
spring:
|
||||
cloud:
|
||||
azure:
|
||||
credential:
|
||||
managed-identity-client-id: ${AZURE_CLIENT_ID}
|
||||
managed-identity-enabled: true
|
||||
client-id: ${AZURE_CLIENT_ID}
|
||||
eventhubs:
|
||||
namespace: ${AZURE_SERVICE_BUS_NAMESPACE}
|
||||
processor:
|
||||
|
@ -497,14 +498,15 @@ spring:
|
|||
connection-string: ${AZURE_SERVICE_BUS_CONNECTION_STRING}
|
||||
----
|
||||
|
||||
* For credentials as MSI, configure below properties in application.yml:
|
||||
* For credentials as managed identities, configure below properties in application.yml:
|
||||
[source,yaml]
|
||||
----
|
||||
spring:
|
||||
cloud:
|
||||
azure:
|
||||
credential:
|
||||
managed-identity-client-id: ${AZURE_CLIENT_ID}
|
||||
managed-identity-enabled: true
|
||||
client-id: ${AZURE_CLIENT_ID}
|
||||
profile:
|
||||
tenant-id: ${AZURE_TENANT_ID}
|
||||
servicebus:
|
||||
|
@ -836,14 +838,15 @@ spring:
|
|||
connection-string: ${AZURE_SERVICE_BUS_CONNECTION_STRING}
|
||||
----
|
||||
|
||||
** For credentials as MSI, configure below properties in application.yml:
|
||||
** For credentials as managed identities, configure below properties in application.yml:
|
||||
[source,yaml]
|
||||
----
|
||||
spring:
|
||||
cloud:
|
||||
azure:
|
||||
credential:
|
||||
managed-identity-client-id: ${AZURE_CLIENT_ID}
|
||||
managed-identity-enabled: true
|
||||
client-id: ${AZURE_CLIENT_ID}
|
||||
profile:
|
||||
tenant-id: ${AZURE_TENANT_ID}
|
||||
storage:
|
||||
|
|
|
@ -19,7 +19,7 @@ Adding below dependencies if you want to migrate your Spring JMS application to
|
|||
=== Configuration
|
||||
|
||||
.Configurable properties when using Spring JMS support
|
||||
[cols="2*",options="header"]
|
||||
[cols="<50,<50",options="header"]
|
||||
|===
|
||||
|Property
|
||||
|Description
|
||||
|
@ -122,7 +122,7 @@ spring:
|
|||
pricing-tier: ${PRICING_TIER}
|
||||
----
|
||||
|
||||
NOTE: The default enabled `ConnectionFactory` is the `CachingConnectionFactory` which adds Session caching as well MessageProducer caching. If you want to activate the connection pooling featured one of JmsPoolConnectionFactory, the property of `*spring.jms.servicebus*.pool.enabled` should be specified `true`. The other pooling configuration options(`*spring.jms.servicebus*.pool.*` prefix) can be found in the above
|
||||
NOTE: The default enabled `ConnectionFactory` is the `CachingConnectionFactory` which adds Session caching as well MessageProducer caching. If you want to activate the connection pooling featured one of JmsPoolConnectionFactory, the property of `spring.jms.servicebus.pool.enabled` should be specified `true`. The other pooling configuration options(`spring.jms.servicebus.pool.` prefix) can be found in the above
|
||||
<<jms-servicebus-pool-configuration, Configuration>> section.
|
||||
|
||||
=== Samples
|
||||
|
|
Загрузка…
Ссылка в новой задаче