Commit 3cdd2228 authored by Christopher Cottier's avatar Christopher Cottier

config adjustments

parent d89cbfd8
package com.nisum.ecomservice.config;
import lombok.NoArgsConstructor;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.beans.factory.annotation.Value;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;
import org.springframework.core.env.Environment;
@Bean
@NoArgsConstructor
public class AppConfig {
@Value("${orders.apiUrl}")
private static String orderManagementUrl;
@Value("${products.apiUrl}")
private static String productsManagementUrl;
@Autowired
private static Environment env;
@Value("${promos.apiUrl}")
private static String promoManagementUrl;
private static String orderManagementUrl=env.getProperty("orders.apiUrl");
private static String productsManagementUrl=env.getProperty("products.apiUrl");
private static String promoManagementUrl=env.getProperty("promos.apiUrl");
public static String getOrderManagementUrl() {
return orderManagementUrl;
......
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