From 309516c40ba6bb0f57afb3aa7db4bfa0511982c1 Mon Sep 17 00:00:00 2001 From: VuTran Date: Mon, 30 Jun 2025 15:48:37 +0700 Subject: [PATCH] update url --- .../cn/stock/market/infrastructure/api/HomeApiIndex.java | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/src/main/java/cn/stock/market/infrastructure/api/HomeApiIndex.java b/src/main/java/cn/stock/market/infrastructure/api/HomeApiIndex.java index 0b97527..72f1f40 100644 --- a/src/main/java/cn/stock/market/infrastructure/api/HomeApiIndex.java +++ b/src/main/java/cn/stock/market/infrastructure/api/HomeApiIndex.java @@ -1,6 +1,8 @@ package cn.stock.market.infrastructure.api; +import cn.qutaojing.common.utils.SpringUtils; import cn.stock.market.dto.model.ChartCandle; import cn.stock.market.dto.model.StockIndex; +import cn.stock.market.web.config.Config; import okhttp3.OkHttpClient; import okhttp3.Request; import okhttp3.Response; @@ -16,8 +18,9 @@ import java.util.List; public class HomeApiIndex { private static final OkHttpClient client = new OkHttpClient(); - private static final String API_URL = "https://apinode-dgdev.moneytj.com/api/ger-market/stocks/query-list?symbols=DAX,MDAX,SDXP,HDAX"; - private static final String BASE_URL = "https://apinode-dgdev.moneytj.com/api/ger-market/chart"; + static Config config = SpringUtils.getBean(Config.class); + private static final String API_URL = config.getStockUrlPrefix() + "/api/ger-market/stocks/query-list?symbols=DAX,MDAX,SDXP,HDAX"; + private static final String BASE_URL = config.getStockUrlPrefix() + "/api/ger-market/chart"; public static List fetchStockIndices() throws Exception { List result = new ArrayList<>();