package com.ff.game.api.xk.address;

import com.dtflys.forest.callback.AddressSource;
import com.dtflys.forest.http.ForestAddress;
import com.dtflys.forest.http.ForestRequest;
import com.ff.base.constant.Constants;
import com.ff.base.system.service.ISysConfigService;
import org.springframework.stereotype.Component;

import javax.annotation.Resource;


/**
 * 我jili address来源
 *
 * @author shi
 * @date 2025/02/10
 */
@Component
public class MyXKAddressSource implements AddressSource {

    @Resource
    private ISysConfigService configService;


    @Override
    public ForestAddress getAddress(ForestRequest request) {
        String apiBaseUrl = configService.selectConfigByKey(Constants.XK_API_BASE_URL);
        return new ForestAddress("https",apiBaseUrl, 443,"api");
    }
}