Inflearn brand logo image

인프런 커뮤니티 질문&답변

znznwkdrns님의 프로필 이미지
znznwkdrns

작성한 질문수

Spring Cloud로 개발하는 마이크로서비스 애플리케이션(MSA)

Orders Microservice - 기능 구현 ②

안녕하세요 강의 포스트맨 요청 데이터 공유받을수 있을까요?

작성

·

39

0

강의 도중에 포스트맨 구글 로그인 하니 데이터가 사라졌습니다

혹시 갖고계시면 공유좀 받을수 있을까요?

답변 1

0

Dowon Lee님의 프로필 이미지
Dowon Lee
지식공유자

안녕하세요, 이도원입니다.

요청하신 Postman에서 사용한 호출 데이터 공유드립니다.

아래 파일을 postman에서 import해서 사용해 보시기 바랍니다.

감사합니다.

{
	"info": {
		"_postman_id": "b45684c3-5d2a-4deb-91e4-cf3766951d3e",
		"name": "MSA",
		"schema": "https://schema.getpostman.com/json/collection/v2.1.0/collection.json",
		"_exporter_id": "5614665"
	},
	"item": [
		{
			"name": "사용자",
			"item": [
				{
					"name": "users",
					"request": {
						"method": "POST",
						"header": [],
						"body": {
							"mode": "raw",
							"raw": "{\n    \"email\": \"edowon0623@gmail.com\",\n    \"name\": \"Dowon Lee\",\n    \"pwd\": \"12345678\"\n}",
							"options": {
								"raw": {
									"language": "json"
								}
							}
						},
						"url": {
							"raw": "http://localhost:{{APIGATEWAY_PORT}}/user-service/users",
							"protocol": "http",
							"host": [
								"localhost"
							],
							"port": "{{APIGATEWAY_PORT}}",
							"path": [
								"user-service",
								"users"
							]
						}
					},
					"response": []
				},
				{
					"name": "users(api)",
					"request": {
						"method": "POST",
						"header": [],
						"body": {
							"mode": "raw",
							"raw": "{\n    \"email\": \"edowon0623@naver.com\",\n    \"name\": \"Dowon Lee\",\n    \"pwd\": \"12345678\"\n}",
							"options": {
								"raw": {
									"language": "json"
								}
							}
						},
						"url": {
							"raw": "http://localhost:{{USER_PORT}}/users",
							"protocol": "http",
							"host": [
								"localhost"
							],
							"port": "{{USER_PORT}}",
							"path": [
								"users"
							]
						}
					},
					"response": []
				},
				{
					"name": "users(api) 수정",
					"request": {
						"method": "PUT",
						"header": [],
						"body": {
							"mode": "raw",
							"raw": "{\n    \"email\": \"edowon0623@gmail.com\",\n    \"name\": \"Kenneth Lee\"\n}",
							"options": {
								"raw": {
									"language": "json"
								}
							}
						},
						"url": {
							"raw": "http://localhost:{{USER_PORT}}/commands/users/5619a58e-28b1-4e4e-821c-eb29dd49dbf0",
							"protocol": "http",
							"host": [
								"localhost"
							],
							"port": "{{USER_PORT}}",
							"path": [
								"commands",
								"users",
								"5619a58e-28b1-4e4e-821c-eb29dd49dbf0"
							]
						}
					},
					"response": []
				},
				{
					"name": "busrefresh",
					"request": {
						"method": "POST",
						"header": [],
						"url": {
							"raw": "127.0.0.1:8000/actuator/busrefresh",
							"host": [
								"127",
								"0",
								"0",
								"1"
							],
							"port": "8000",
							"path": [
								"actuator",
								"busrefresh"
							]
						}
					},
					"response": []
				},
				{
					"name": "login",
					"request": {
						"method": "POST",
						"header": [],
						"body": {
							"mode": "raw",
							"raw": "{\n    \"email\": \"edowon0623@gmail.com\",\n    \"password\": \"12345678\"\n}",
							"options": {
								"raw": {
									"language": "json"
								}
							}
						},
						"url": {
							"raw": "localhost:{{APIGATEWAY_PORT}}/user-service/login",
							"host": [
								"localhost"
							],
							"port": "{{APIGATEWAY_PORT}}",
							"path": [
								"user-service",
								"login"
							]
						}
					},
					"response": []
				},
				{
					"name": "login(api)",
					"request": {
						"method": "POST",
						"header": [],
						"body": {
							"mode": "raw",
							"raw": "{\n    \"email\": \"edowon0623@naver.com\",\n    \"password\": \"12345678\"\n}",
							"options": {
								"raw": {
									"language": "json"
								}
							}
						},
						"url": {
							"raw": "http://localhost:{{USER_PORT}}/login",
							"protocol": "http",
							"host": [
								"localhost"
							],
							"port": "{{USER_PORT}}",
							"path": [
								"login"
							]
						}
					},
					"response": []
				},
				{
					"name": "update user",
					"request": {
						"auth": {
							"type": "bearer",
							"bearer": [
								{
									"key": "token",
									"value": "eyJhbGciOiJIUzUxMiJ9.eyJzdWIiOiI4MDRkMTkzNy1mNzFlLTRjODItODBlMS0xZjQ1NTA5ODcwOTUiLCJleHAiOjE3MTEyNjAwMjd9.YSs4RcFAPYiln080wHrRulQVGlnUDGM-mTgJQgIN3PvYmizMS0GnDiDCMg0ardZqRsthg3kM_vlim2sUJxbmjw",
									"type": "string"
								}
							]
						},
						"method": "PATCH",
						"header": [],
						"body": {
							"mode": "raw",
							"raw": "{\n    \"email\": \"edowon0623@naver.com\",\n    \"name\": \"Kenneth Lee\",\n    \"pwd\": \"12345678\"\n}",
							"options": {
								"raw": {
									"language": "json"
								}
							}
						},
						"url": {
							"raw": "localhost:{{APIGATEWAY_PORT}}/user-service/user/test",
							"host": [
								"localhost"
							],
							"port": "{{APIGATEWAY_PORT}}",
							"path": [
								"user-service",
								"user",
								"test"
							]
						}
					},
					"response": []
				},
				{
					"name": "all users(api)",
					"request": {
						"auth": {
							"type": "bearer",
							"bearer": [
								{
									"key": "token",
									"value": "{{TOKEN}}",
									"type": "string"
								}
							]
						},
						"method": "GET",
						"header": [],
						"url": {
							"raw": "localhost:{{USER_PORT}}/users",
							"host": [
								"localhost"
							],
							"port": "{{USER_PORT}}",
							"path": [
								"users"
							]
						}
					},
					"response": []
				},
				{
					"name": "all users",
					"request": {
						"auth": {
							"type": "bearer",
							"bearer": [
								{
									"key": "token",
									"value": "{{TOKEN}}",
									"type": "string"
								}
							]
						},
						"method": "GET",
						"header": [],
						"url": {
							"raw": "http://localhost:{{APIGATEWAY_PORT}}/user-service/users",
							"protocol": "http",
							"host": [
								"localhost"
							],
							"port": "{{APIGATEWAY_PORT}}",
							"path": [
								"user-service",
								"users"
							]
						}
					},
					"response": []
				},
				{
					"name": "health-check",
					"request": {
						"auth": {
							"type": "bearer",
							"bearer": [
								{
									"key": "token",
									"value": "eyJhbGciOiJIUzUxMiJ9.eyJzdWIiOiIyOWVhZmY5My0wZWYxLTQxMDMtYjhkMi0zMmZjZTJhMTczMGEiLCJleHAiOjE3MTQ5NzIyOTIsImlhdCI6MTcwOTMzMjI5Mn0.VOgYSohgD6nndzSRa89xqWiXdJkKwjbUg3draFQeE-_LlyQFntGH3rLMvL--osVh7W4k91ckbZaPn1I-1dFx3w",
									"type": "string"
								}
							]
						},
						"method": "GET",
						"header": [],
						"url": {
							"raw": "127.0.0.1:{{APIGATEWAY_PORT}}/user-service/health-check",
							"host": [
								"127",
								"0",
								"0",
								"1"
							],
							"port": "{{APIGATEWAY_PORT}}",
							"path": [
								"user-service",
								"health-check"
							]
						}
					},
					"response": []
				},
				{
					"name": "get user detail",
					"request": {
						"auth": {
							"type": "bearer",
							"bearer": [
								{
									"key": "token",
									"value": "{{TOKEN}}",
									"type": "string"
								}
							]
						},
						"method": "GET",
						"header": [],
						"url": {
							"raw": "127.0.0.1:{{APIGATEWAY_PORT}}/user-service/users/{{USER-ID}}",
							"host": [
								"127",
								"0",
								"0",
								"1"
							],
							"port": "{{APIGATEWAY_PORT}}",
							"path": [
								"user-service",
								"users",
								"{{USER-ID}}"
							]
						}
					},
					"response": []
				},
				{
					"name": "get user detail(api)",
					"request": {
						"auth": {
							"type": "bearer",
							"bearer": [
								{
									"key": "token",
									"value": "{{TOKEN}}",
									"type": "string"
								}
							]
						},
						"method": "GET",
						"header": [],
						"url": {
							"raw": "http://localhost:{{USER_PORT}}/users/{{USER-ID}}",
							"protocol": "http",
							"host": [
								"localhost"
							],
							"port": "{{USER_PORT}}",
							"path": [
								"users",
								"{{USER-ID}}"
							]
						}
					},
					"response": []
				},
				{
					"name": "로그인(user-service)",
					"request": {
						"auth": {
							"type": "noauth"
						},
						"method": "POST",
						"header": [],
						"body": {
							"mode": "raw",
							"raw": "{\n    \"email\": \"edowon0623@gmail.com\",\n    \"password\": \"12345678\"\n}",
							"options": {
								"raw": {
									"language": "json"
								}
							}
						},
						"url": {
							"raw": "http://localhost:{{USER_PORT}}/login",
							"protocol": "http",
							"host": [
								"localhost"
							],
							"port": "{{USER_PORT}}",
							"path": [
								"login"
							]
						}
					},
					"response": []
				}
			]
		},
		{
			"name": "주문",
			"item": [
				{
					"name": "orders",
					"request": {
						"method": "POST",
						"header": [],
						"body": {
							"mode": "raw",
							"raw": "{\n    \"productId\": \"CATALOG-003\",\n    \"qty\": 5,\n    \"unitPrice\": 20500\n}",
							"options": {
								"raw": {
									"language": "json"
								}
							}
						},
						"url": {
							"raw": "localhost:{{APIGATEWAY_PORT}}/order-service/{{USER-ID}}/orders",
							"host": [
								"localhost"
							],
							"port": "{{APIGATEWAY_PORT}}",
							"path": [
								"order-service",
								"{{USER-ID}}",
								"orders"
							]
						}
					},
					"response": []
				},
				{
					"name": "shipping",
					"protocolProfileBehavior": {
						"disableBodyPruning": true
					},
					"request": {
						"method": "GET",
						"header": [],
						"body": {
							"mode": "raw",
							"raw": "{\n    \"productId\": \"CATALOG-001\",\n    \"qty\": 5,\n    \"unitPrice\": 1500\n}",
							"options": {
								"raw": {
									"language": "json"
								}
							}
						},
						"url": {
							"raw": "localhost:8083/{{USER-ID}}/ordered",
							"host": [
								"localhost"
							],
							"port": "8083",
							"path": [
								"{{USER-ID}}",
								"ordered"
							]
						}
					},
					"response": []
				},
				{
					"name": "orders(api)",
					"request": {
						"auth": {
							"type": "noauth"
						},
						"method": "POST",
						"header": [],
						"body": {
							"mode": "raw",
							"raw": "{\n    \"productId\": \"CATALOG-003\",\n    \"qty\": 5,\n    \"unitPrice\": 20500\n}",
							"options": {
								"raw": {
									"language": "json"
								}
							}
						},
						"url": {
							"raw": "localhost:{{ORDER_PORT}}/{{USER-ID}}/orders",
							"host": [
								"localhost"
							],
							"port": "{{ORDER_PORT}}",
							"path": [
								"{{USER-ID}}",
								"orders"
							]
						}
					},
					"response": []
				}
			]
		},
		{
			"name": "상품",
			"item": [
				{
					"name": "get all catalogs",
					"request": {
						"method": "GET",
						"header": [],
						"url": {
							"raw": "127.0.0.1:{{APIGATEWAY_PORT}}/catalog-service/catalogs",
							"host": [
								"127",
								"0",
								"0",
								"1"
							],
							"port": "{{APIGATEWAY_PORT}}",
							"path": [
								"catalog-service",
								"catalogs"
							]
						}
					},
					"response": []
				}
			]
		},
		{
			"name": "K8s",
			"item": [
				{
					"name": "[k8s] login",
					"request": {
						"method": "POST",
						"header": [],
						"body": {
							"mode": "raw",
							"raw": "{\n    \"email\": \"edowon0623@gmail.com\",\n    \"password\": \"12345678\"\n}",
							"options": {
								"raw": {
									"language": "json"
								}
							}
						},
						"url": {
							"raw": "http://localhost:{{USER_PORT}}/login",
							"protocol": "http",
							"host": [
								"localhost"
							],
							"port": "{{USER_PORT}}",
							"path": [
								"login"
							]
						}
					},
					"response": []
				},
				{
					"name": "[k8s] all-users",
					"request": {
						"auth": {
							"type": "bearer",
							"bearer": [
								{
									"key": "token",
									"value": "{{TOKEN}}",
									"type": "string"
								}
							]
						},
						"method": "GET",
						"header": [],
						"url": {
							"raw": "http://192.168.0.33:{{USER_PORT}}/users",
							"protocol": "http",
							"host": [
								"192",
								"168",
								"0",
								"33"
							],
							"port": "{{USER_PORT}}",
							"path": [
								"users"
							]
						}
					},
					"response": []
				},
				{
					"name": "[k8s] user detail",
					"request": {
						"auth": {
							"type": "bearer",
							"bearer": [
								{
									"key": "token",
									"value": "{{TOKEN}}",
									"type": "string"
								}
							]
						},
						"method": "GET",
						"header": [],
						"url": {
							"raw": "http://localhost:{{USER_PORT}}/users/{{USER-ID}}",
							"protocol": "http",
							"host": [
								"localhost"
							],
							"port": "{{USER_PORT}}",
							"path": [
								"users",
								"{{USER-ID}}"
							]
						}
					},
					"response": []
				},
				{
					"name": "[k8s] create order",
					"request": {
						"method": "POST",
						"header": [],
						"body": {
							"mode": "raw",
							"raw": "{\n    \"productId\": \"CATALOG-002\",\n    \"qty\": 30,\n    \"unitPrice\": 1500\n}",
							"options": {
								"raw": {
									"language": "json"
								}
							}
						},
						"url": {
							"raw": "http://localhost:{{ORDER_PORT}}/order-service/{{USER-ID}}/orders",
							"protocol": "http",
							"host": [
								"localhost"
							],
							"port": "{{ORDER_PORT}}",
							"path": [
								"order-service",
								"{{USER-ID}}",
								"orders"
							]
						}
					},
					"response": []
				},
				{
					"name": "[k8s] all catalogs",
					"request": {
						"method": "GET",
						"header": [],
						"url": {
							"raw": "http://localhost:{{CATALOG_PORT}}/catalog-service/catalogs",
							"protocol": "http",
							"host": [
								"localhost"
							],
							"port": "{{CATALOG_PORT}}",
							"path": [
								"catalog-service",
								"catalogs"
							]
						}
					},
					"response": []
				},
				{
					"name": "[k8s] create user",
					"request": {
						"method": "POST",
						"header": [],
						"body": {
							"mode": "raw",
							"raw": "{\n    \"email\": \"edowon0623@gmail.com\",\n    \"name\": \"Dowon Lee\",\n    \"pwd\": \"12345678\"\n}",
							"options": {
								"raw": {
									"language": "json"
								}
							}
						},
						"url": {
							"raw": "http://localhost:{{USER_PORT}}/users",
							"protocol": "http",
							"host": [
								"localhost"
							],
							"port": "{{USER_PORT}}",
							"path": [
								"users"
							]
						}
					},
					"response": []
				}
			]
		},
		{
			"name": "Patterns 실습",
			"item": [
				{
					"name": "주문하기(order-service)",
					"request": {
						"auth": {
							"type": "noauth"
						},
						"method": "POST",
						"header": [],
						"body": {
							"mode": "raw",
							"raw": "{\n    \"productId\": \"CATALOG-001\",\n    \"qty\": 10,\n    \"unitPrice\": 1000\n}",
							"options": {
								"raw": {
									"language": "json"
								}
							}
						},
						"url": {
							"raw": "http://localhost:{{ORDER_PORT}}/{{USER-ID}}/orders",
							"protocol": "http",
							"host": [
								"localhost"
							],
							"port": "{{ORDER_PORT}}",
							"path": [
								"{{USER-ID}}",
								"orders"
							]
						}
					},
					"response": []
				},
				{
					"name": "주문수정하기(order-service) Copy",
					"request": {
						"auth": {
							"type": "noauth"
						},
						"method": "PATCH",
						"header": [],
						"body": {
							"mode": "raw",
							"raw": "{\n    \"productId\": \"CATALOG-002\",\n    \"qty\": 10,\n    \"unitPrice\": 1500\n}",
							"options": {
								"raw": {
									"language": "json"
								}
							}
						},
						"url": {
							"raw": "http://localhost:{{ORDER_PORT}}/{{USER-ID}}/orders/{{ORDER_ID}}",
							"protocol": "http",
							"host": [
								"localhost"
							],
							"port": "{{ORDER_PORT}}",
							"path": [
								"{{USER-ID}}",
								"orders",
								"{{ORDER_ID}}"
							]
						}
					},
					"response": []
				},
				{
					"name": "주문상세(order-service)",
					"protocolProfileBehavior": {
						"disableBodyPruning": true
					},
					"request": {
						"auth": {
							"type": "noauth"
						},
						"method": "GET",
						"header": [],
						"body": {
							"mode": "raw",
							"raw": "{\n    \"productId\": \"CATALOG-002\",\n    \"qty\": 10,\n    \"unitPrice\": 1200\n}",
							"options": {
								"raw": {
									"language": "json"
								}
							}
						},
						"url": {
							"raw": "http://localhost:{{ORDER_PORT}}/orders/f25a60a3-d515-4606-b56b-3c999f591291",
							"protocol": "http",
							"host": [
								"localhost"
							],
							"port": "{{ORDER_PORT}}",
							"path": [
								"orders",
								"f25a60a3-d515-4606-b56b-3c999f591291"
							]
						}
					},
					"response": []
				},
				{
					"name": "회원가입(user-service)",
					"request": {
						"auth": {
							"type": "noauth"
						},
						"method": "POST",
						"header": [],
						"body": {
							"mode": "raw",
							"raw": "{\n    \"email\": \"edowon0623@gmail.com\",\n    \"name\": \"Dowon Lee\",\n    \"pwd\": \"12345678\"\n}",
							"options": {
								"raw": {
									"language": "json"
								}
							}
						},
						"url": {
							"raw": "http://localhost:{{USER_PORT}}/users",
							"protocol": "http",
							"host": [
								"localhost"
							],
							"port": "{{USER_PORT}}",
							"path": [
								"users"
							]
						}
					},
					"response": []
				},
				{
					"name": "전체사용자목록(user-service)",
					"request": {
						"auth": {
							"type": "bearer"
						},
						"method": "GET",
						"header": [],
						"url": {
							"raw": "http://127.0.0.1:{{USER_PORT}}/users",
							"protocol": "http",
							"host": [
								"127",
								"0",
								"0",
								"1"
							],
							"port": "{{USER_PORT}}",
							"path": [
								"users"
							]
						}
					},
					"response": []
				},
				{
					"name": "사용자상세조회(user-service)",
					"request": {
						"auth": {
							"type": "noauth"
						},
						"method": "GET",
						"header": [],
						"url": {
							"raw": "http://127.0.0.1:{{USER_PORT}}/users/{{USER_ID}}",
							"protocol": "http",
							"host": [
								"127",
								"0",
								"0",
								"1"
							],
							"port": "{{USER_PORT}}",
							"path": [
								"users",
								"{{USER_ID}}"
							]
						}
					},
					"response": []
				}
			]
		}
	]
}
znznwkdrns님의 프로필 이미지
znznwkdrns
질문자

감사합니다~!

znznwkdrns님의 프로필 이미지
znznwkdrns

작성한 질문수

질문하기