From e852ed6b15be95cfb8fe0e615631a18c48a6e62a Mon Sep 17 00:00:00 2001 From: Galia Cheng Date: Mon, 4 Mar 2024 17:36:41 +0800 Subject: [PATCH 1/2] add command to validate the db setting --- README.md | 30 ++++++++++++++++++++++++++++-- 1 file changed, 28 insertions(+), 2 deletions(-) diff --git a/README.md b/README.md index 3d8a7f7..72e5847 100644 --- a/README.md +++ b/README.md @@ -1218,11 +1218,11 @@ In order to use it, I added the `p:dataTable` tag in index.xtml. az webapp config appsettings set \ --resource-group WebApp \ --name yoshiowebapp \ - --settings JDBC_URL="jdbc:mysql://my-mysqlserver.mysql.database.azure.com:3306/world? - useSSL=true&requireSSL=false&serverTimezone=JST" + --settings JDBC_URL="jdbc:mysql://my-mysqlserver.mysql.database.azure.com:3306/world?useSSL=true&requireSSL=false&serverTimezone=JST" ``` ```azurecli +# user should be string like: azureuser@my-mysqlserver az webapp config appsettings set \ --resource-group WebApp \ --name yoshiowebapp \ @@ -1236,6 +1236,32 @@ In order to use it, I added the `p:dataTable` tag in index.xtml. --settings DB_PASSWORD="PASSWORD" ``` +```azurecli +$ az webapp config appsettings list --name azure-javaweb-app-1709538913002 -g MicroProfile +[ + { + "name": "JDBC_DRIVER", + "slotSetting": false, + "value": "com.mysql.cj.jdbc.Driver" + }, + { + "name": "JDBC_URL", + "slotSetting": false, + "value": "jdbc:mysql://my-mysqlserver.mysql.database.azure.com:3306/world?useSSL=true&requireSSL=false&serverTimezone=JST" + }, + { + "name": "DB_USER", + "slotSetting": false, + "value": "azureuser@my-mysqlserver" + }, + { + "name": "DB_PASSWORD", + "slotSetting": false, + "value": "mypassword" + } +] +``` + ### Configure in the persistence.xml ```xml From 4b50e6e158ddff269dc49889badb16c8695b7b52 Mon Sep 17 00:00:00 2001 From: Galia Cheng Date: Tue, 5 Mar 2024 13:57:52 +0800 Subject: [PATCH 2/2] use the same app name and resource group name --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index 72e5847..7a45668 100644 --- a/README.md +++ b/README.md @@ -1237,7 +1237,7 @@ In order to use it, I added the `p:dataTable` tag in index.xtml. ``` ```azurecli -$ az webapp config appsettings list --name azure-javaweb-app-1709538913002 -g MicroProfile +$ az webapp config appsettings list --name yoshiowebapp -g WebApp [ { "name": "JDBC_DRIVER",