package com.ruoyi.yunxin.config;

import com.dtflys.forest.Forest;
import com.dtflys.forest.config.ForestConfiguration;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Component;

import javax.annotation.PostConstruct;


@Component
public class ForestInit {

    @Autowired
    private YunxinProperties yunxinProperties;

    @PostConstruct
    public void init(){
        ForestConfiguration configuration = Forest.config();
        configuration.setVariableValue("baseUrl", (method) -> yunxinProperties.getBaseUrl());
    }
}
