Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix some format for all the project. #230

Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ This sample shows how to convert a Spring Cloud Application with Cosmos DB to be
1. Then use the [az cosmosdb keys list](https://docs.microsoft.com/cli/azure/cosmosdb/keys?view=azure-cli-latest#az-cosmosdb-keys-list).

```azurecli
az cosmosdb keys list --name my-cosmos-db -g MyResourceGroup
az cosmosdb keys list --name my-cosmos-db -g MyResourceGroup
```

Record the primaryMasterKey.
Expand Down Expand Up @@ -164,29 +164,28 @@ In this section, you clone a containerized Spring Boot application and test it l
1. Upload your Cosmos DB key to Key Vault.

```azurecli
az keyvault secret set --vault-name myVaultName --name "COSMOSDB-KEY" --value your-cosmosdb-key
az keyvault secret set --vault-name myVaultName --name "COSMOSDB-KEY" --value your-cosmosdb-key
```

1. Upload your Configurations Cosmos DB name and URI to App Configuration

```azurecli
az appconfig kv set --name myConfigStoreName --key "/application/azure.cosmos.database" --value your-cosmos-db-databasename --yes
az appconfig kv set --name myConfigStoreName --key "/application/azure.cosmos.uri" --value your-cosmosdb-uri --yes
az appconfig kv set --name myConfigStoreName --key "/application/azure.cosmos.database" --value your-cosmos-db-databasename --yes
az appconfig kv set --name myConfigStoreName --key "/application/azure.cosmos.uri" --value your-cosmosdb-uri --yes
```

1. Add a Key Vault Reference to App Configuration, make sure to update the uri with your config store name.

```azurecli
az appconfig kv set-keyvault --name myConfigStoreName --key "/application/azure.cosmos.key" --secret-identifier https://myVaultName.vault.azure.net/secrets/COSMOSDB-KEY --yes
az appconfig kv set-keyvault --name myConfigStoreName --key "/application/azure.cosmos.key" --secret-identifier https://myVaultName.vault.azure.net/secrets/COSMOSDB-KEY --yes
```

1. Delete `application.propertes` from `src/main/resources`.

1. Create a new file called `bootstrap.properties` in `src/main/resources`, and add the following.

```properties
spring.cloud.azure.appconfiguration.stores[0].endpoint=https://{my-configstore-name}.azconfig.io

spring.cloud.azure.appconfiguration.stores[0].endpoint=https://{my-configstore-name}.azconfig.io
```

1. Update the pom.xml file to now include.
Expand Down
4 changes: 2 additions & 2 deletions appconfiguration/feature-management-sample/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ Start the application and check the resulting console output to check the return

1. Load features from application.yml
```
$ mvn spring-boot:run
mvn spring-boot:run
```

1. Check the returned value. The feature `Beta` has one filter `Random` which defines the Beta feature will be activated randomly with some chance value. You should see the following information displayed: **RUNNING : application** or **RUNNING : beta**.
Expand Down Expand Up @@ -65,7 +65,7 @@ az appconfig credential list --resource-group <your-resource-group> --name <name

1. Load features from application.yml
```
$ mvn spring-boot:run
mvn spring-boot:run
```

1. Check the returned value. The feature `Beta` has one filter `Random` which defines the Beta feature will be activated randomly with some chance value. You should see the following information displayed: **RUNNING : application** or **RUNNING : beta**.
Expand Down
10 changes: 5 additions & 5 deletions appconfiguration/feature-management-web-sample/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ Start the application and check the resulting console output to check the return

1. Load features from application.yml
```
$ mvn spring-boot:run
mvn spring-boot:run
```

2. Check the returned value. The feature `Beta` has one filter `Random` which defines
Expand All @@ -34,22 +34,22 @@ Start the application and access http://localhost:8080 to check the returned val

1. Load properties similar with from application.properties, i.e., keys starting with /application/
```
$ mvn spring-boot:run
mvn spring-boot:run
```

2. Load properties similar with from application_dev.properties, i.e., keys starting with /application_dev
```
$ mvn -Dspring.profiles.active=dev spring-boot:run
mvn -Dspring.profiles.active=dev spring-boot:run
```

3. Load properties similar with from foo.properties, i.e., keys starting with /foo/
```
$ mvn -Dspring.application.name=foo spring-boot:run
mvn -Dspring.application.name=foo spring-boot:run
```

4. Load properties similar with from foo_dev.properties, i.e., keys starting with /foo_dev/
```
$ mvn -Dspring.application.name=foo -Dspring.profiles.active=dev spring-boot:run
mvn -Dspring.application.name=foo -Dspring.profiles.active=dev spring-boot:run
```

### More details
Expand Down
6 changes: 3 additions & 3 deletions spring-petclinic-microservices/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -34,14 +34,14 @@ You will:
### Clone the sample app repository

```bash
git clone https://github.com/Azure-Samples/azure-spring-boot-samples
git clone https://github.com/Azure-Samples/azure-spring-boot-samples
```

### Change directory and build the project

```bash
cd azure-spring-boot-samples/spring-petclinic-microservices
mvn clean package -DskipTests
cd azure-spring-boot-samples/spring-petclinic-microservices
mvn clean package -DskipTests
```

This will take a few minutes.
Expand Down