4.1 KiB
title | keywords | author | ms.author | ms.date | ms.topic | ms.prod | ms.technology | ms.devlang | ms.service |
---|---|---|---|---|---|---|---|---|---|
Azure Spring Cloud Starter Cache client library for Java | Azure, java, SDK, API, spring-starter-azure-cache, springcloud | maggiepint | magpint | 09/15/2020 | article | azure | azure | java | springcloud |
Azure Spring Cloud Starter Cache client library for Java - Version 1.2.8
This starter provides auto-configuration of Azure Cache for Redis. Azure Cache for Redis provides an in-memory data store based on the open-source software Redis.
Package (Maven) | API reference documentation | Samples
Getting started
Prerequisites
- Java Development Kit (JDK) with version 8 or above
- Azure Subscription
- Maven 3.0 and above
Include the package
<dependency>
<groupId>com.microsoft.azure</groupId>
<artifactId>spring-starter-azure-cache</artifactId>
<version>1.2.8</version>
</dependency>
Key concepts
Redis improves the performance and scalability of an application that uses on backend data stores heavily. It is able to process large volumes of application request by keeping frequently accessed data in the server memory that can be written to and read from quickly.
Azure Cache for Redis offers Redis as a managed service. It provides secure and dedicated Redis server instances and full Redis API compatibility. The service is operated by Microsoft, hosted on Azure, and accessible to any application within or outside of Azure.
Examples
Please refer to this sample project illustrating how to use this starter.
Troubleshooting
Enable client logging
Azure SDKs for Java offers a consistent logging story to help aid in troubleshooting application errors and expedite their resolution. The logs produced will capture the flow of an application before reaching the terminal state to help locate the root issue. View the logging wiki for guidance about enabling logging.
Enable Spring logging
Spring allow all the supported logging systems to set logger levels set in the Spring Environment (for example, in application.properties) by using logging.level.<logger-name>=<level>
where level is one of TRACE, DEBUG, INFO, WARN, ERROR, FATAL, or OFF. The root logger can be configured by using logging.level.root.
The following example shows potential logging settings in application.properties
:
logging.level.root=WARN
logging.level.org.springframework.web=DEBUG
logging.level.org.hibernate=ERROR
For more information about setting logging in spring, please refer to the official doc.
Next steps
The following section provide a sample project illustrating how to use the starter.
More sample code
Contributing
This project welcomes contributions and suggestions. Most contributions require you to agree to a Contributor License Agreement (CLA) declaring that you have the right to, and actually do, grant us the rights to use your contribution. For details, visit https://cla.microsoft.com.
Please follow instructions here to build from source or contribute.