change api url

This commit is contained in:
kimscott
2020-02-11 17:50:19 +09:00
parent 2cacfca6b8
commit 4138076baf
3 changed files with 15 additions and 7 deletions

View File

@@ -40,7 +40,7 @@ public class Order {
if("true".equalsIgnoreCase(env.getProperty("checkStock"))){
// 1. 주문에 대한 상품 조회 - API
String productUrl = env.getProperty("productUrl") + "/product/" + productId;
String productUrl = env.getProperty("api.url.product") + "/product/" + productId;
ResponseEntity<String> productEntity = restTemplate.getForEntity(productUrl, String.class);
JsonParser parser = new JsonParser();

View File

@@ -20,7 +20,7 @@ public class OrderController {
@Autowired
RestTemplate restTemplate;
@Value("${delivery.api.url:http://delivery:8080}")
@Value("${api.url.delivery:http://delivery:8080}")
private String remoteURL;
@PostMapping("/order")

View File

@@ -32,16 +32,24 @@ spring:
hibernate:
show_sql: true
format_sql: true
logging:
level:
org:
hibernate:
SQL: DEBUG
type:
descriptor:
sql:
BasicBinder: TRACE
#logging:
# level:
# org.hibernate.type: trace
# org.springframework.cloud: debug
productUrl: http://localhost:8085
delivery:
api:
url: http://localhost:8082
api:
url:
delivery: http://localhost:8082
product: http://localhost:8085
server:
port: 8081