{"id":2326,"date":"2022-12-16T10:29:57","date_gmt":"2022-12-16T18:29:57","guid":{"rendered":"https:\/\/devblogs.microsoft.com\/azure-sdk\/?p=2326"},"modified":"2022-12-16T10:29:57","modified_gmt":"2022-12-16T18:29:57","slug":"announcing-the-stable-release-of-spring-cloud-azure-4-5-0","status":"publish","type":"post","link":"https:\/\/devblogs.microsoft.com\/azure-sdk\/announcing-the-stable-release-of-spring-cloud-azure-4-5-0\/","title":{"rendered":"Announcing the stable release of Spring Cloud Azure 4.5.0"},"content":{"rendered":"<p>We&#8217;re pleased to announce that Spring Cloud Azure version 4.5.0 has been released and is available from Maven Central. This release is compatible with:<\/p>\n<ul>\n<li>Spring Boot versions:\n<ul>\n<li>2.5.0 through 2.5.14<\/li>\n<li>2.6.0 through 2.6.14<\/li>\n<li>2.7.0 through 2.7.6<\/li>\n<\/ul>\n<\/li>\n<li>Spring Cloud versions:\n<ul>\n<li>2020.0.3 through 2020.0.6<\/li>\n<li>2021.0.0 through 2021.0.5<\/li>\n<\/ul>\n<\/li>\n<\/ul>\n<blockquote><p>NOTE: Spring Boot 2.5.x (x &gt; 14), 2.6.y (y &gt; 14), and 2.7.z (z &gt; 6) should be supported, but they weren&#8217;t tested with this release.<\/p>\n<p>Spring Cloud 2020.0.x (x &gt; 6) and 2021.0.y (y &gt; 5) should be supported, but they weren&#8217;t tested with this release.<\/p><\/blockquote>\n<p>The 4.5.0 release focused on improving support for <a href=\"https:\/\/learn.microsoft.com\/azure\/developer\/intro\/passwordless-overview\">passwordless connections<\/a>. This release is our <strong>first stable version<\/strong> to support passwordless connections to Azure Database for MySQL and Azure Database for PostgreSQL. For a complete list of changes, see the <a href=\"https:\/\/github.com\/Azure\/azure-sdk-for-java\/releases\/tag\/spring-cloud-azure_4.5.0\">release notes<\/a>.<\/p>\n<p>The Spring Cloud Azure team will continue to focus on passwordless features. Azure SQL Database, Azure Cosmos DB, Azure Redis, Azure Service Bus JMS, and other services will support passwordless connections in the future.<\/p>\n<p><img decoding=\"async\" title=\"Passwordless connections for Java applications to Azure services\" src=\"https:\/\/devblogs.microsoft.com\/azure-sdk\/wp-content\/uploads\/sites\/58\/2022\/12\/passwordless-connections-from-java-apps-to-data-services.jpg\" alt=\"Passwordless connections for Java applications to Azure services\" \/><\/p>\n<h2>Connect to Azure Database for MySQL and PostgreSQL via passwordless connections<\/h2>\n<blockquote><p>NOTE: This feature is only available in version 4.5.0.<\/p><\/blockquote>\n<p>Both Azure Database for MySQL and Azure Database for PostgreSQL support integration with Azure Active Directory (Azure AD). This integration allows you to authenticate using Azure AD users, applications, or managed identities.<\/p>\n<blockquote><p>NOTE: This feature applies to both Single Server and Flexible Server variants of Azure Database for MySQL and PostgreSQL.<\/p><\/blockquote>\n<p>To authenticate in a passwordless manner, complete the following steps:<\/p>\n<ol>\n<li>Add the dependencies:<strong>MySQL:<\/strong>\n<pre><code class=\"language-xml\">&lt;dependency&gt;\r\n    &lt;groupId&gt;com.azure.spring&lt;\/groupId&gt;\r\n    &lt;artifactId&gt;spring-cloud-azure-starter-jdbc-mysql&lt;\/artifactId&gt;\r\n    &lt;version&gt;4.5.0&lt;\/version&gt;\r\n&lt;\/dependency&gt;<\/code><\/pre>\n<p><strong>PostgreSQL:<\/strong><\/p>\n<pre><code class=\"language-xml\">&lt;dependency&gt;\r\n    &lt;groupId&gt;com.azure.spring&lt;\/groupId&gt;\r\n    &lt;artifactId&gt;spring-cloud-azure-starter-jdbc-postgresql&lt;\/artifactId&gt;\r\n    &lt;version&gt;4.5.0&lt;\/version&gt;\r\n&lt;\/dependency&gt;<\/code><\/pre>\n<blockquote><p>NOTE: The dependencies will be automatically imported if you choose Azure Support and MySQL\/PostgreSQL Driver dependency in Spring Initializr.<\/p><\/blockquote>\n<\/li>\n<li>Configure the properties:\n<pre><code class=\"language-yaml\">spring:\r\n datasource:\r\n   url: jdbc:mysql:\/\/${AZ_DATABASE_SERVER_NAME}.mysql.database.azure.com:3306\/${AZ_DATABASE_NAME}\r\n   username: ${AZ_AD_USERNAME}\r\n   azure:\r\n     passwordless-enabled: true<\/code><\/pre>\n<blockquote><p>NOTE: If you&#8217;re using PostgreSQL, change the <code>spring.datasource.url<\/code> property value to something like <code>jdbc:postgresql:\/\/${AZ_DATABASE_SERVER_NAME}.postgres.database.azure.com:5432\/${AZ_DATABASE_NAME}<\/code>.<\/p><\/blockquote>\n<\/li>\n<\/ol>\n<p>In addition, we designed <a href=\"https:\/\/aka.ms\/spring\/azd-template\/postgresql\">this Azure Developer CLI template<\/a>. The template allows you to more easily experience the PostgreSQL passwordless feature on Azure. It uses the service&#8217;s Flexible Server variant along with Azure Container Apps.<\/p>\n<h2>Other features added<\/h2>\n<ul>\n<li>Remove warning logs of Kafka passwordless autoconfiguration <a href=\"https:\/\/github.com\/Azure\/azure-sdk-for-java\/issues\/31182\">#31182<\/a><\/li>\n<li>Enhance the token authentication converter and Azure AD Resource Server configurer adapter to accept the custom JWT granted authorities converter <a href=\"https:\/\/github.com\/Azure\/azure-sdk-for-java\/issues\/28665\">#28665<\/a><\/li>\n<\/ul>\n<h2>Dependency upgrades<\/h2>\n<p>In this release, the following dependencies were upgraded:<\/p>\n<ul>\n<li><code>spring-security<\/code> to 5.7.5 to address <a href=\"https:\/\/tanzu.vmware.com\/security\/cve-2022-31690\">CVE-2022-31690<\/a><\/li>\n<li>Azure SDK BOM to 1.2.8<\/li>\n<li>Azure Identity to 1.7.1<\/li>\n<li>Azure Identity Extensions to 1.0.0<\/li>\n<li>Azure Spring Data Cosmos to 3.30.0<\/li>\n<li>Azure Resource Manager to 2.21.0<\/li>\n<\/ul>\n<h2>Feedback<\/h2>\n<p>As always, we welcome feedback and contributions. Reach out to us on <a href=\"https:\/\/stackoverflow.com\/questions\/tagged\/spring-cloud-azure\">StackOverflow<\/a> or <a href=\"https:\/\/github.com\/Azure\/azure-sdk-for-java\/issues?q=is%3Aissue+is%3Aopen+label%3Aazure-spring\">GitHub<\/a>.<\/p>\n<h2>Resources<\/h2>\n<p>Here&#8217;s a list of links that are helpful to learn more about Spring Cloud Azure:<\/p>\n<ul>\n<li><a href=\"https:\/\/aka.ms\/spring\/docs\">Reference documentation<\/a><\/li>\n<li><a href=\"https:\/\/aka.ms\/spring\/msdocs\">Conceptual documentation<\/a><\/li>\n<li><a href=\"https:\/\/aka.ms\/spring\/samples\">Code samples<\/a><\/li>\n<li><a href=\"https:\/\/aka.ms\/spring\/versions\">Spring versions mapping<\/a><\/li>\n<\/ul>\n","protected":false},"excerpt":{"rendered":"<p>This post announces the release of Spring Cloud Azure 4.5.0.<\/p>\n","protected":false},"author":108073,"featured_media":2349,"comment_status":"open","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"_acf_changed":false,"footnotes":""},"categories":[1],"tags":[160,871,872],"class_list":["post-2326","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-azure-sdk","tag-java","tag-spring","tag-spring-cloud-azure"],"acf":[],"blog_post_summary":"<p>This post announces the release of Spring Cloud Azure 4.5.0.<\/p>\n","_links":{"self":[{"href":"https:\/\/devblogs.microsoft.com\/azure-sdk\/wp-json\/wp\/v2\/posts\/2326","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/devblogs.microsoft.com\/azure-sdk\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/devblogs.microsoft.com\/azure-sdk\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/devblogs.microsoft.com\/azure-sdk\/wp-json\/wp\/v2\/users\/108073"}],"replies":[{"embeddable":true,"href":"https:\/\/devblogs.microsoft.com\/azure-sdk\/wp-json\/wp\/v2\/comments?post=2326"}],"version-history":[{"count":0,"href":"https:\/\/devblogs.microsoft.com\/azure-sdk\/wp-json\/wp\/v2\/posts\/2326\/revisions"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/devblogs.microsoft.com\/azure-sdk\/wp-json\/wp\/v2\/media\/2349"}],"wp:attachment":[{"href":"https:\/\/devblogs.microsoft.com\/azure-sdk\/wp-json\/wp\/v2\/media?parent=2326"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/devblogs.microsoft.com\/azure-sdk\/wp-json\/wp\/v2\/categories?post=2326"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/devblogs.microsoft.com\/azure-sdk\/wp-json\/wp\/v2\/tags?post=2326"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}