This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| application: | |
| dynamo: | |
| customer-table-name: "demo-customer-info" | |
| region: "ap-southeast-2" | |
| endpoint: "http://localhost:8042" |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| import org.jetbrains.kotlin.gradle.tasks.KotlinCompile | |
| plugins { | |
| id("org.springframework.boot") version "2.1.11.RELEASE" | |
| id("io.spring.dependency-management") version "1.0.8.RELEASE" | |
| kotlin("jvm") version "1.2.71" | |
| kotlin("plugin.spring") version "1.2.71" | |
| } | |
| group = "io.codebrews" |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| { | |
| "coord": { | |
| "lon": 151.21, | |
| "lat": -33.87 | |
| }, | |
| "weather": [ | |
| { | |
| "id": 500, | |
| "main": "Rain", | |
| "description": "light rain", |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| package io.codebrews.wiremockdemo | |
| import com.github.tomakehurst.wiremock.client.WireMock.* | |
| import com.github.tomakehurst.wiremock.junit.WireMockRule | |
| import org.junit.ClassRule | |
| import org.junit.Test | |
| import org.junit.runner.RunWith | |
| import org.slf4j.Logger | |
| import org.slf4j.LoggerFactory | |
| import org.springframework.beans.factory.annotation.Autowired |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| package io.codebrews.wiremockdemo | |
| import com.github.tomakehurst.wiremock.client.WireMock.* | |
| import com.github.tomakehurst.wiremock.junit.WireMockRule | |
| import org.junit.ClassRule | |
| import org.junit.Test | |
| import org.junit.runner.RunWith | |
| import org.slf4j.Logger | |
| import org.slf4j.LoggerFactory | |
| import org.springframework.beans.factory.annotation.Autowired |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| app.openweather.baseurl=http://localhost:8089 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| $ docker-compose -f docker-compose-dynamodb-local.yaml up -d |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| aws dynamodb put-item --endpoint-url http://localhost:8042 --table-name demo-customer-info \ | |
| --item '{"customerId": {"S": "1111"}, "email": {"S": "[email protected]"}}' |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| aws dynamodb get-item --endpoint-url http://localhost:8042 --table-name demo-customer-info \ | |
| --key '{"customerId": {"S": "1111"}}' |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| aws dynamodb update-item --endpoint-url http://localhost:8042 --table-name demo-customer-info \ | |
| --key '{"customerId": {"S": "1111"}}' \ | |
| --update-expression 'SET #email = :newEmail' \ | |
| --expression-attribute-names '{"#email": "email"}' \ | |
| --expression-attribute-values '{":newEmail": {"S": "[email protected]"}}' |