Skip to content

Commit 21ba05c

Browse files
committed
break long code line
1 parent 8fb3507 commit 21ba05c

File tree

2 files changed

+6
-3
lines changed

2 files changed

+6
-3
lines changed

articles/service-connector/includes/code_mysql_aad.md

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,9 @@ ms.author: xiaofanzhou
2929

3030
```java
3131
String url = System.getenv("AZURE_MYSQL_CONNECTIONSTRING");
32-
Connection connection = DriverManager.getConnection(url + "&defaultAuthenticationPlugin=com.azure.identity.extensions.jdbc.mysql.AzureMysqlAuthenticationPlugin&authenticationPlugins=com.azure.identity.extensions.jdbc.mysql.AzureMysqlAuthenticationPlugin");
32+
String pluginName = "com.azure.identity.extensions.jdbc.mysql.AzureMysqlAuthenticationPlugin";
33+
Connection connection = DriverManager.getConnection(url + "&defaultAuthenticationPlugin=" + pluginName +
34+
"&authenticationPlugins=" + pluginName);
3335
```
3436

3537
### [Spring](#tab/spring)

articles/service-connector/includes/code_postgres_aad.md

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -31,8 +31,9 @@ ms.author: xiaofanzhou
3131
```java
3232
import java.sql.*;
3333

34-
String url = System.getenv("AZURE_POSTGRESQL_CONNECTIONSTRING");
35-
Connection connection = DriverManager.getConnection(url + "&authenticationPluginClassName=com.Azure.identity.extensions.jdbc.postgresql.AzurePostgresqlAuthenticationPlugin");
34+
String url = System.getenv("AZURE_POSTGRESQL_CONNECTIONSTRING");
35+
String pluginName = "com.Azure.identity.extensions.jdbc.postgresql.AzurePostgresqlAuthenticationPlugin";
36+
Connection connection = DriverManager.getConnection(url + "&authenticationPluginClassName=" + pluginName);
3637
```
3738

3839
For more information, see the following resources:

0 commit comments

Comments
 (0)