Commit d89cbfd8 authored by Christopher Cottier's avatar Christopher Cottier

injecting url values from properties, in progress

parent 16fff575
package com.nisum.ecomservice.config;
import org.springframework.beans.factory.annotation.Value;
import org.springframework.context.annotation.Bean;
@Bean
public class AppConfig {
private static final String orderManagementUrl = "http://localhost:8084";
private static final String productsManagementUrl = "http://localhost:8083";
private static final String promoManagementUrl = "http://localhost:8082";
@Value("${orders.apiUrl}")
private static String orderManagementUrl;
@Value("${products.apiUrl}")
private static String productsManagementUrl;
@Value("${promos.apiUrl}")
private static String promoManagementUrl;
public static String getOrderManagementUrl() {
return orderManagementUrl;
......
......@@ -2,3 +2,6 @@ spring.data.mongodb.uri=mongodb+srv://ecom:ecom@e-commerce-db-cluster.va815.mong
spring.data.mongodb.database=e-commerce-db
security.enable-csrf=false
server.port=8080
products.apiUrl=http://localhost:8083
promos.apiUrl=http://localhost:8082
orders.apiUrl=http://localhost:8084
\ No newline at end of file
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment